1 <?php 2 3 namespace Box\Spout\Reader\CSV\Manager; 4 5 use Box\Spout\Common\Helper\EncodingHelper; 6 use Box\Spout\Common\Manager\OptionsManagerAbstract; 7 use Box\Spout\Reader\Common\Entity\Options; 8 9 /** 10 * Class OptionsManager 11 * CSV Reader options manager 12 */ 13 class OptionsManager extends OptionsManagerAbstract 14 { 15 /** 16 * {@inheritdoc} 17 */ 18 protected function getSupportedOptions() 19 { 20 return [ 21 Options::SHOULD_FORMAT_DATES, 22 Options::SHOULD_PRESERVE_EMPTY_ROWS, 23 Options::FIELD_DELIMITER, 24 Options::FIELD_ENCLOSURE, 25 Options::ENCODING, 26 ]; 27 } 28 29 /** 30 * {@inheritdoc} 31 */ 32 protected function setDefaultOptions() 33 { 34 $this->setOption(Options::SHOULD_FORMAT_DATES, false); 35 $this->setOption(Options::SHOULD_PRESERVE_EMPTY_ROWS, false); 36 $this->setOption(Options::FIELD_DELIMITER, ','); 37 $this->setOption(Options::FIELD_ENCLOSURE, '"'); 38 $this->setOption(Options::ENCODING, EncodingHelper::ENCODING_UTF8); 39 } 40 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body