1 | <?php |
||
18 | class Parser implements \Xparse\ParserInterface\ParserInterface { |
||
19 | |||
20 | /** |
||
21 | * |
||
22 | * @var null|\Xparse\ElementFinder\ElementFinder |
||
23 | */ |
||
24 | protected $lastPage = null; |
||
25 | |||
26 | /** |
||
27 | * @var ClientInterface |
||
28 | */ |
||
29 | protected $client = null; |
||
30 | |||
31 | /** |
||
32 | * @var ElementFinderFactory |
||
33 | */ |
||
34 | protected $elementFinderFactory = null; |
||
35 | |||
36 | /** |
||
37 | * @var null|ResponseInterface |
||
38 | */ |
||
39 | protected $lastResponse = null; |
||
40 | |||
41 | |||
42 | /** |
||
43 | * @param ClientInterface|null $client |
||
44 | * @param ElementFinderFactory|null $elementFinderFactory |
||
45 | */ |
||
46 | 6 | public function __construct(ClientInterface $client = null, ElementFinderFactory $elementFinderFactory = null) { |
|
62 | |||
63 | |||
64 | /** |
||
65 | * @param string $url |
||
66 | * @return \Xparse\ElementFinder\ElementFinder |
||
67 | * @throws \InvalidArgumentException |
||
68 | */ |
||
69 | 3 | public function get($url) { |
|
77 | |||
78 | |||
79 | /** |
||
80 | * @param string $url |
||
81 | * @param array $data |
||
82 | * @return \Xparse\ElementFinder\ElementFinder |
||
83 | * @throws \InvalidArgumentException |
||
84 | */ |
||
85 | 2 | public function post($url, $data) { |
|
97 | |||
98 | |||
99 | /** |
||
100 | * @return \Xparse\ElementFinder\ElementFinder |
||
101 | */ |
||
102 | 2 | public function getLastPage() { |
|
105 | |||
106 | |||
107 | /** |
||
108 | * @param \Xparse\ElementFinder\ElementFinder $lastPage |
||
109 | * @return $this |
||
110 | */ |
||
111 | 3 | public function setLastPage($lastPage) { |
|
115 | |||
116 | |||
117 | /** |
||
118 | * @return null|ResponseInterface |
||
119 | */ |
||
120 | 1 | public function getLastResponse() { |
|
123 | |||
124 | |||
125 | /** |
||
126 | * @return ClientInterface |
||
127 | */ |
||
128 | 3 | public function getClient() { |
|
131 | |||
132 | |||
133 | /** |
||
134 | * @param $request |
||
135 | * @param array $options |
||
136 | * @return \Xparse\ElementFinder\ElementFinder |
||
137 | * @throws \Exception |
||
138 | */ |
||
139 | 3 | public function send(RequestInterface $request, array $options = []) { |
|
165 | |||
166 | } |
||
167 |