1 | <?php |
||
12 | class StreamedCsvResponse extends StreamedResponse |
||
13 | { |
||
14 | /** |
||
15 | * @var array|\Traversable |
||
16 | */ |
||
17 | private $rows; |
||
18 | |||
19 | /** |
||
20 | * Constructor. |
||
21 | * |
||
22 | * @param array|\Traversable $rows An iterable representing the csv rows. |
||
23 | * @param string $filename An filename the client downloads. |
||
24 | * |
||
25 | * @throws \InvalidArgumentException |
||
26 | */ |
||
27 | 14 | public function __construct($rows, $filename) |
|
45 | |||
46 | /** |
||
47 | * Outputs the result. |
||
48 | */ |
||
49 | 10 | public function output() |
|
59 | } |
||
60 |