Simple class to output CSV data Uses CollectionCore
- Class name: CSVCore
- Source: classes/CSV.php line 33
public mixed $collection
- Visibility: public
- Source: classes/CSV.php line 36.
public mixed $delimiter
- Visibility: public
- Source: classes/CSV.php line 37.
public mixed $filename
- Visibility: public
- Source: classes/CSV.php line 35.
mixed CSVCore::__construct(\Collection $collection, string $filename, string $delimiter)
Loads objects, filename and optionnaly a delimiter.
- Visibility: public
- Source: classes/CSV.php line 45
- $collection Collection - collection of objects / array (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 57
mixed CSVCore::headers()
Adds headers
- Visibility: public
- Source: classes/CSV.php line 102
mixed CSVCore::output($data)
Wraps data and echoes Uses defined delimiter
- Visibility: public
- Source: classes/CSV.php line 82
- $data mixed
string CSVCore::wrap(string $data)
Escapes data
- Visibility: public
- This method is static.
- Source: classes/CSV.php line 93
- $data string