| 1 | <?php |
||
| 10 | class TypeConvertParser implements ParserInterface |
||
| 11 | { |
||
| 12 | /** @var ParserInterface $parser parser for given input */ |
||
| 13 | private $parser; |
||
| 14 | |||
| 15 | /** @var ConverterInterface $converter converter for parser result */ |
||
| 16 | private $converter; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * constructor |
||
| 20 | * |
||
| 21 | * @param ParserInterface $parser parser |
||
| 22 | * @param ConverterInterface $converter converter for parser result |
||
| 23 | */ |
||
| 24 | 12 | public function __construct(ParserInterface $parser, ConverterInterface $converter) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * parse given `$source` and then convert type |
||
| 32 | * |
||
| 33 | * @param Source $source parser input |
||
| 34 | * @return array |
||
| 35 | * @throws UnserializeFailedException |
||
| 36 | */ |
||
| 37 | 12 | public function parse(Source $source) |
|
| 42 | } |
||
| 43 |