1 | <?php |
||
10 | class ArrayHandler implements HandlerInterface |
||
11 | { |
||
12 | /** @var ParserInterface $expressionParser parser for unserialize expression */ |
||
13 | private $expressionParser; |
||
14 | |||
15 | /** @var integer */ |
||
16 | const CLOSE_BRACE_LENGTH = 1; |
||
17 | |||
18 | /** |
||
19 | * constructor |
||
20 | * |
||
21 | * @param ParserInterface $expressionParser parser for unserialize expression |
||
22 | */ |
||
23 | 107 | public function __construct(ParserInterface $expressionParser) |
|
27 | |||
28 | /** |
||
29 | * parse given `$source` as PHP serialized array |
||
30 | * |
||
31 | * @param Source $source parser input |
||
32 | * @param string $args array length |
||
33 | * @return array |
||
34 | * @throws UnserializeFailedException |
||
35 | */ |
||
36 | 9 | public function handle(Source $source, $args) |
|
50 | |||
51 | /** |
||
52 | * parse given `$source` as array key (s.t. integer|string) |
||
53 | * |
||
54 | * @param Source $source input |
||
55 | * @return array |
||
56 | * @throws UnserializeFailedException |
||
57 | */ |
||
58 | 6 | private function parseKey($source) |
|
66 | } |
||
67 |