| 1 | <?php |
||
| 23 | class TxtDecoder implements DecoderInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * Format supported by decoder |
||
| 27 | * |
||
| 28 | * @const string |
||
| 29 | */ |
||
| 30 | private const FORMAT = 'txt'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Line delimiter |
||
| 34 | * |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | private $lineDelimiter; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * TxtDecoder constructor. |
||
| 41 | * |
||
| 42 | * @param string $lineDelimiter Line delimiter |
||
| 43 | */ |
||
| 44 | public function __construct(string $lineDelimiter = "\n") |
||
| 48 | |||
| 49 | /** |
||
| 50 | * {@inheritdoc} |
||
| 51 | */ |
||
| 52 | public function decode($data, $format, array $context = []) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritdoc} |
||
| 65 | */ |
||
| 66 | public function supportsDecoding($format) |
||
| 70 | } |
||
| 71 |