| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\OpenSpout\Writer\CSV\Manager; |
| 4 |
|
| 5 |
use FluentCart\OpenSpout\Common\Manager\OptionsManagerAbstract; |
| 6 |
use FluentCart\OpenSpout\Writer\Common\Entity\Options; |
| 7 |
/** |
| 8 |
* CSV Writer options manager. |
| 9 |
*/ |
| 10 |
class OptionsManager extends OptionsManagerAbstract |
| 11 |
{ |
| 12 |
/** |
| 13 |
* {@inheritdoc} |
| 14 |
*/ |
| 15 |
protected function getSupportedOptions() |
| 16 |
{ |
| 17 |
return [Options::FIELD_DELIMITER, Options::FIELD_ENCLOSURE, Options::SHOULD_ADD_BOM]; |
| 18 |
} |
| 19 |
/** |
| 20 |
* {@inheritdoc} |
| 21 |
*/ |
| 22 |
protected function setDefaultOptions() |
| 23 |
{ |
| 24 |
$this->setOption(Options::FIELD_DELIMITER, ','); |
| 25 |
$this->setOption(Options::FIELD_ENCLOSURE, '"'); |
| 26 |
$this->setOption(Options::SHOULD_ADD_BOM, \true); |
| 27 |
} |
| 28 |
} |
| 29 |
|