1 | <?php |
||
19 | class Csv implements Decoder |
||
20 | { |
||
21 | use MimeTypeTrait; |
||
22 | |||
23 | /** |
||
24 | * Fields delimiter character. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $delimiter; |
||
29 | |||
30 | /** |
||
31 | * Field enclosure character. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $enclosure; |
||
36 | |||
37 | /** |
||
38 | * Escape character. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $escape; |
||
43 | |||
44 | /** |
||
45 | * CSV request decoder constructor. |
||
46 | * |
||
47 | * @param string $delimiter |
||
48 | * @param string $enclosure |
||
49 | * @param string $escape |
||
50 | */ |
||
51 | public function __construct($delimiter = ',', $enclosure = '"', $escape = '\\') |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | * |
||
64 | * @throws \InvalidArgumentException |
||
65 | * @throws \RuntimeException |
||
66 | */ |
||
67 | public function decode($rawBody) |
||
85 | } |
||
86 |