MIOLO25
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe mcsvdump

Membros públicos

 arrayToCsvString ($array, $separator=';', $trim='both', $removeEmptyLines=TRUE)
 
 _valToCsvHelper ($val, $separator, $trimFunction)
 
 _define_newline ()
 
 _get_browser_type ()
 
 _get_mime_type ()
 
 _generate_csv ($array)
 
 dump ($array, $filename="dump", $ext="csv")
 
 __construct ($separator=',')
 
 arrayToCsvString ($array, $separator=',', $trim='both', $removeEmptyLines=TRUE)
 
 _valToCsvHelper ($val, $separator, $trimFunction)
 
 _define_newline ()
 
 _get_browser_type ()
 
 _get_mime_type ()
 
 _generate_csv ($array)
 
 dump ($array, $filename="dump", $ext="csv")
 

Documentação dos Construtores & Destrutor

◆ __construct()

__construct ( $separator = ',')

Documentação das funções

◆ _define_newline() [1/2]

_define_newline ( )

@desc Define EOL character according to target OS @access private

Retorna
String A String containing the End Of Line Sequence corresponding to the client's OS

◆ _define_newline() [2/2]

_define_newline ( )

@desc Define EOL character according to target OS @access private

Retorna
String A String containing the End Of Line Sequence corresponding to the client's OS

◆ _generate_csv() [1/2]

_generate_csv ( $array)

@desc Generates a CSV File from an SQL String (and outputs it to the browser) @access private

Parâmetros
String$query_stringAn SQL statement (usually a SELECT statement)
String$dbnameName of the Database
String$userUser to Access the Database
String$passwordPassword to Access the Database
String$hostName of the Host holding the DB

◆ _generate_csv() [2/2]

_generate_csv ( $array)

@desc Generates a CSV File from an SQL String (and outputs it to the browser) @access private

Parâmetros
String$query_stringAn SQL statement (usually a SELECT statement)
String$dbnameName of the Database
String$userUser to Access the Database
String$passwordPassword to Access the Database
String$hostName of the Host holding the DB

◆ _get_browser_type() [1/2]

_get_browser_type ( )

@desc Define the client's browser type @access private

Retorna
String A String containing the Browser's type or brand

◆ _get_browser_type() [2/2]

_get_browser_type ( )

@desc Define the client's browser type @access private

Retorna
String A String containing the Browser's type or brand

◆ _get_mime_type() [1/2]

_get_mime_type ( )

@desc Define MIME-TYPE according to target Browser @access private

Retorna
String A string containing the MIME-TYPE String corresponding to the client's browser

◆ _get_mime_type() [2/2]

_get_mime_type ( )

@desc Define MIME-TYPE according to target Browser @access private

Retorna
String A string containing the MIME-TYPE String corresponding to the client's browser

◆ _valToCsvHelper() [1/2]

_valToCsvHelper ( $val,
$separator,
$trimFunction )

@desc Works on a string to include in a csv string. @access private

Parâmetros
String$val
String$separator
Mixed$trimFunctionIf the cells should be trimmed , default is 'both'. It can also be 'left', 'right' or 'both'. 'none' makes it faster since omits many function calls.
Retorna
String
Veja também
arrayToCsvString()

◆ _valToCsvHelper() [2/2]

_valToCsvHelper ( $val,
$separator,
$trimFunction )

@desc Works on a string to include in a csv string. @access private

Parâmetros
String$val
String$separator
Mixed$trimFunctionIf the cells should be trimmed , default is 'both'. It can also be 'left', 'right' or 'both'. 'none' makes it faster since omits many function calls.
Retorna
String
Veja também
arrayToCsvString()

◆ arrayToCsvString() [1/2]

arrayToCsvString ( $array,
$separator = ',',
$trim = 'both',
$removeEmptyLines = TRUE )

@desc Takes an array and creates a csv string from it.

@access public

Parâmetros
Array$array(see below)
String$separatorField separator ()default is ';')
String$trimIf the cells should be trimmed , default is 'both'. It can also be 'left', 'right' or 'both'. 'none' makes it faster since omits many function calls.
Boolean$removeEmptyLines(default is TRUE. removes "lines" that have no value, would come out empty.)
Retorna
String A CSV String. It returns an empty string if there Array is empty (NULL)

◆ arrayToCsvString() [2/2]

arrayToCsvString ( $array,
$separator = ';',
$trim = 'both',
$removeEmptyLines = TRUE )

@desc Takes an array and creates a csv string from it.

@access public

Parâmetros
Array$array(see below)
String$separatorField separator ()default is ';')
String$trimIf the cells should be trimmed , default is 'both'. It can also be 'left', 'right' or 'both'. 'none' makes it faster since omits many function calls.
Boolean$removeEmptyLines(default is TRUE. removes "lines" that have no value, would come out empty.)
Retorna
String A CSV String. It returns an empty string if there Array is empty (NULL)

◆ dump() [1/2]

dump ( $array,
$filename = "dump",
$ext = "csv" )

@desc Generate the CSV File and send it to browser or download it as a file @access public

Parâmetros
String$query_stringAn SQL statement (usually a SELECT statement)
String$filenameFilename to use when downloading the File. Default="dump". If set to "", the dump is displayed on the browser.
String$extensionExtension to use when downloading the File. Default="csv"
String$dbnameName of the Database to use
String$userUser to Access the Database
String$passwordPassword to Access the Database
String$hostName of the Host holding the DB

◆ dump() [2/2]

dump ( $array,
$filename = "dump",
$ext = "csv" )

@desc Generate the CSV File and send it to browser or download it as a file @access public

Parâmetros
String$query_stringAn SQL statement (usually a SELECT statement)
String$filenameFilename to use when downloading the File. Default="dump". If set to "", the dump is displayed on the browser.
String$extensionExtension to use when downloading the File. Default="csv"
String$dbnameName of the Database to use
String$userUser to Access the Database
String$passwordPassword to Access the Database
String$hostName of the Host holding the DB

A documentação para esta classe foi gerada a partir dos seguintes ficheiros: