1 | <?php |
||
12 | class CsvWriter |
||
13 | { |
||
14 | /** |
||
15 | * @var resource |
||
16 | */ |
||
17 | private $out; |
||
18 | |||
19 | /** |
||
20 | * @var null |
||
21 | */ |
||
22 | private $encodeTo; |
||
23 | |||
24 | 11 | public function __construct($encodeTo = null) |
|
32 | |||
33 | 11 | public function __destruct() |
|
37 | |||
38 | /** |
||
39 | * Writes the csv to stdout. |
||
40 | * |
||
41 | * @param array|\Traversable $row |
||
42 | */ |
||
43 | 11 | public function writeRow($row) |
|
61 | |||
62 | /** |
||
63 | * Returns the formatted cell. |
||
64 | * |
||
65 | * @param string $cell |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 10 | private function formatCell($cell) |
|
79 | } |
||
80 |