Encodes CSV data.
- author Kévin Dunglas
- author Oliver Hoff
CloneableInstantiable
Constants |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony
|
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
public Symfony |
Methods |
public __construct(array $defaultContext = []) |
public decode(string $data, string $format, array $context = []) : ?mixed |
public encode(?mixed $data, string $format, array $context = []) : string |
public supportsDecoding(string $format) : bool |
public supportsEncoding(string $format) : bool |
Constants |
private Symfony |
private Symfony |
Properties |
private array $defaultContext = ['csv_delimiter' => ',', 'csv_enclosure' => '"', 'csv_escape_char' => '', 'csv_end_of_line' => ' ', 'csv_escape_formulas' => false, 'csv_headers' => [], 'csv_key_separator' => '.', 'no_headers' => false, 'as_collection' => true, 'output_utf8_bom' => false] |
Methods |
private extractHeaders(iterable $data) : array
|
private flatten(iterable $array, array $result, string $keySeparator, string $parentKey = '', bool $escapeFormulas = false) : void Flattens an array and generates keys including the path. |
private getCsvOptions(array $context) : array |