1 | <?php |
||
16 | class DispatchingValueParser implements ValueParser { |
||
17 | |||
18 | /** |
||
19 | * @var ValueParser[] |
||
20 | */ |
||
21 | private $parsers; |
||
22 | |||
23 | /** |
||
24 | * @see ParseException::getExpectedFormat |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private $format; |
||
29 | |||
30 | /** |
||
31 | * @param ValueParser[] $parsers |
||
32 | * @param string $format An identifier describing the expected format of the values to parse. |
||
33 | * |
||
34 | * @throws InvalidArgumentException |
||
35 | */ |
||
36 | 5 | public function __construct( array $parsers, $format ) { |
|
48 | |||
49 | /** |
||
50 | * @param mixed $value |
||
51 | * |
||
52 | * @throws ParseException |
||
53 | * @return mixed |
||
54 | */ |
||
55 | 2 | public function parse( $value ) { |
|
70 | |||
71 | } |
||
72 |