1 | <?php |
||
12 | class RecursivePagination { |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $queue = []; |
||
18 | |||
19 | /** |
||
20 | * @var Parser |
||
21 | */ |
||
22 | protected $parser; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $elementSelector = []; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * @param Parser $parser |
||
32 | * @param string|array $expression |
||
33 | * @throws \Exception |
||
34 | */ |
||
35 | 27 | public function __construct(Parser $parser, $expression) { |
|
39 | |||
40 | |||
41 | /** |
||
42 | * @param array|string $links |
||
43 | * @param bool $state |
||
44 | * @throws \InvalidArgumentException |
||
45 | * @return $this |
||
46 | */ |
||
47 | 18 | public function addToQueue($links, $state = false) { |
|
60 | |||
61 | |||
62 | /** |
||
63 | * @return ElementFinder|null |
||
64 | * @throws \Exception |
||
65 | * @throws \InvalidArgumentException |
||
66 | */ |
||
67 | 12 | public function getNextPage() { |
|
93 | |||
94 | |||
95 | /** |
||
96 | * @param string|array $expression |
||
97 | * @throws \InvalidArgumentException |
||
98 | */ |
||
99 | 27 | private function setExpression($expression) { |
|
117 | |||
118 | } |