Total Complexity | 9 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class BlobChunk |
||
8 | { |
||
9 | /** |
||
10 | * @var Config |
||
11 | */ |
||
12 | private $config; |
||
13 | |||
14 | public function __construct(Config $config = null) |
||
15 | { |
||
16 | $this->config = ($config instanceof Config ? $config : Config::createConfig()); |
||
17 | } |
||
18 | |||
19 | public function __invoke(string $input): array |
||
20 | { |
||
21 | return $this->parse($input); |
||
22 | } |
||
23 | |||
24 | public function parse(string $input): array |
||
25 | { |
||
26 | return $this->run($this->config->docFactory->getNode($input)->firstChild); |
||
27 | } |
||
28 | |||
29 | public static function process(string $input, Config $config = null): array |
||
32 | } |
||
33 | |||
34 | private function run(\DOMNode $node, $carry = []): array |
||
43 | } |
||
44 | } |
||
45 |