1 | <?php |
||
12 | class CsvWriter |
||
13 | { |
||
14 | /** |
||
15 | * @var resource |
||
16 | */ |
||
17 | private $out; |
||
18 | |||
19 | /** |
||
20 | * @var string|null |
||
21 | */ |
||
22 | private $encodeTo; |
||
23 | |||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | private $charsNeedingEnclosing; |
||
28 | |||
29 | 3 | public function __construct($encodeTo = null) |
|
44 | |||
45 | 3 | public function __destruct() |
|
49 | |||
50 | /** |
||
51 | * Writes the csv to stdout. |
||
52 | * |
||
53 | * @param array|\Traversable $row |
||
54 | */ |
||
55 | 3 | public function writeRow($row) |
|
71 | |||
72 | /** |
||
73 | * Returns the formatted cell. |
||
74 | * |
||
75 | * @param string $cell |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 2 | private function formatCell($cell) |
|
99 | } |
||
100 |