Simple class to output CSV data Uses CollectionCore
- Class name: CSVCore
- Source: classes/CSV.php line 32
public mixed $collection
- Visibility: public
- Source: classes/CSV.php line 35.
public mixed $delimiter
- Visibility: public
- Source: classes/CSV.php line 36.
public mixed $filename
- Visibility: public
- Source: classes/CSV.php line 34.
mixed CSVCore::__construct(array|\Iterator $collection, string $filename, string $delimiter)
Loads objects, filename and optionnaly a delimiter.
- Visibility: public
- Source: classes/CSV.php line 44
- $collection array|Iterator - Collection of objects / arrays (of non-objects)
- $filename string - : used later to save the file
- $delimiter string - Optional : delimiter used
mixed CSVCore::export()
Main function Adds headers Outputs
- Visibility: public
- Source: classes/CSV.php line 56
mixed CSVCore::headers()
Adds headers
- Visibility: public
- Source: classes/CSV.php line 99
mixed CSVCore::output($data)
Wraps data and echoes Uses defined delimiter
- Visibility: public
- Source: classes/CSV.php line 79
- $data mixed
string CSVCore::wrap(string $data)
Escapes data
- Visibility: public
- This method is static.
- Source: classes/CSV.php line 90
- $data string