[ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 315 lignes (12 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Horde_Data_csv:: (5 méthodes):
discoverFormat()
importFile()
exportData()
exportFile()
nextStep()
Classe: Horde_Data_csv - X-Ref
Horde_Data implementation for comma-separated data (CSV).discoverFormat($filename) X-Ref |
Tries to discover the CSV file's parameters. param: string $filename The name of the file to investigate. return: array An associative array with the following possible keys: |
importFile($filename, $header = false, $sep = '', $quote = '',$fields = null, $import_mapping = array() X-Ref |
Imports and parses a CSV file. param: string $filename The name of the file to parse. param: boolean $header Does the first line contain the field/column param: string $sep The field/column separator. param: string $quote The quoting character. param: integer $fields The number or fields/columns. param: string $charset The file's charset. @since Horde 3.1. param: string $crlf The file's linefeed characters. @since Horde 3.1. return: array A two-dimensional array of all imported data rows. If |
exportData($data, $header = false, $export_mapping = array() X-Ref |
Builds a CSV file from a given data structure and returns it as a string. param: array $data A two-dimensional array containing the data set. param: boolean $header If true, the rows of $data are associative return: string The CSV data. |
exportFile($filename, $data, $header = false,$export_mapping = array() X-Ref |
Builds a CSV file from a given data structure and triggers its download. It DOES NOT exit the current script but only outputs the correct headers and data. param: string $filename The name of the file to be downloaded. param: array $data A two-dimensional array containing the data param: boolean $header If true, the rows of $data are associative |
nextStep($action, $param = array() X-Ref |
Takes all necessary actions for the given import step, parameters and form values and returns the next necessary step. param: integer $action The current step. One of the IMPORT_* constants. param: array $param An associative array containing needed return: mixed Either the next step as an integer constant or imported |
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |