| 1 | <?php |
||
| 5 | final class CsvOptions |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var string |
||
| 9 | */ |
||
| 10 | private $delimiter; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $enclosure; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $escapeChar; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Construct a new CsvOptions instance. |
||
| 24 | * |
||
| 25 | * @param string $delimiter The field delimiter (one character only). |
||
| 26 | * @param string $enclosure The field enclosure character (one character only). |
||
| 27 | * @param string $escapeChar The escape character (one character only). |
||
| 28 | */ |
||
| 29 | public function __construct(string $delimiter = ',', string $enclosure = '"', string $escapeChar = '\\') |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Gets the field delimiter (one character only). |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getDelimiter() : string |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Gets the field enclosure character (one character only). |
||
| 60 | * |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function getEnclosure() : string |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Gets the escape character (one character only). |
||
| 70 | * |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | public function getEscapeChar() : string |
||
| 77 | |||
| 78 | } |
||
| 79 |