1 | <?php |
||
24 | class Reader implements CrawlerInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var DOMDocument |
||
28 | */ |
||
29 | private $document; |
||
30 | |||
31 | /** |
||
32 | * @var SafeXPath |
||
33 | */ |
||
34 | private $xpath; |
||
35 | |||
36 | /** |
||
37 | * @var ElementMap |
||
38 | */ |
||
39 | private $inputMap; |
||
40 | |||
41 | /** |
||
42 | * @param DOMDocument $document |
||
43 | */ |
||
44 | 1 | public function __construct(DOMDocument $document) |
|
52 | |||
53 | /** |
||
54 | * @param string $content |
||
55 | * @return self |
||
56 | */ |
||
57 | public function setDocumentContent($content) |
||
64 | |||
65 | /** |
||
66 | * @return DOMDocument |
||
67 | */ |
||
68 | public function getDocument() |
||
72 | |||
73 | /** |
||
74 | * @return SafeXPath |
||
75 | */ |
||
76 | public function getXPath() |
||
80 | |||
81 | /** |
||
82 | * @return ElementMap |
||
83 | */ |
||
84 | public function getInputMap() |
||
88 | |||
89 | /** |
||
90 | * @param string $id |
||
91 | * @throws BadMethodCallException |
||
92 | */ |
||
93 | public function click($id) |
||
108 | |||
109 | /** |
||
110 | * @param string $id |
||
111 | * @throws BadMethodCallException |
||
112 | */ |
||
113 | public function select($id) |
||
125 | |||
126 | /** |
||
127 | * @param RequestInterface $input |
||
128 | * @throws BadMethodCallException |
||
129 | */ |
||
130 | public function sendRequest(RequestInterface $request) |
||
136 | |||
137 | /** |
||
138 | * @param string $url |
||
139 | * @throws BadMethodCallException |
||
140 | */ |
||
141 | public function open(UriInterface $url) |
||
147 | |||
148 | /** |
||
149 | * @return Psr\Http\Message\UriInterface |
||
150 | */ |
||
151 | public function getUri() |
||
155 | |||
156 | /** |
||
157 | * @param string $xpath |
||
158 | * @param DOMElement|null $scope |
||
159 | * @throws InvalidArgumentException If xpath is not valid |
||
160 | * @return DOMNodeList |
||
161 | */ |
||
162 | public function query($xpath, DOMElement $scope = null) |
||
166 | |||
167 | /** |
||
168 | * @param string $xpath |
||
169 | * @throws InvalidArgumentException when id not found |
||
170 | * @return DOMElement |
||
171 | */ |
||
172 | public function getElement($xpath) |
||
184 | |||
185 | /** |
||
186 | * @param string $id |
||
187 | * @throws InvalidArgumentException when id not found |
||
188 | * @return string |
||
189 | */ |
||
190 | public function getText($id) |
||
196 | |||
197 | /** |
||
198 | * @param string $id |
||
199 | * @throws InvalidArgumentException when id not found |
||
200 | * @return string |
||
201 | */ |
||
202 | public function getTagName($id) |
||
206 | |||
207 | /** |
||
208 | * @param string $id |
||
209 | * @param string $name |
||
210 | * @throws InvalidArgumentException when id not found |
||
211 | * @return string |
||
212 | */ |
||
213 | public function getAttribute($id, $name) |
||
217 | |||
218 | /** |
||
219 | * @param string $id |
||
220 | * @throws InvalidArgumentException when id not found |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getHtml($id) |
||
227 | |||
228 | /** |
||
229 | * @return string |
||
230 | */ |
||
231 | public function getFullHtml() |
||
235 | |||
236 | /** |
||
237 | * @param string $id |
||
238 | * @throws InvalidArgumentException when id not found |
||
239 | * @return boolean |
||
240 | */ |
||
241 | public function isVisible($id) |
||
259 | |||
260 | /** |
||
261 | * @param string $id |
||
262 | * @throws InvalidArgumentException when id not found |
||
263 | * @return boolean |
||
264 | */ |
||
265 | public function isSelected($id) |
||
269 | |||
270 | /** |
||
271 | * @param string $id |
||
272 | * @throws InvalidArgumentException when id not found |
||
273 | * @return boolean |
||
274 | */ |
||
275 | public function isChecked($id) |
||
279 | |||
280 | /** |
||
281 | * @param DOMElement $element |
||
282 | * @throws InvalidArgumentException when id not found |
||
283 | * @return Element\AbstractElement |
||
284 | */ |
||
285 | public function getInput(DOMElement $element) |
||
289 | |||
290 | /** |
||
291 | * @param string $id |
||
292 | * @throws InvalidArgumentException when id not found |
||
293 | * @return mixed |
||
294 | */ |
||
295 | public function getValue($id) |
||
299 | |||
300 | /** |
||
301 | * @param string $id |
||
302 | * @param string $value |
||
303 | * @throws InvalidArgumentException when id not found |
||
304 | */ |
||
305 | public function setValue($id, $value) |
||
313 | |||
314 | /** |
||
315 | * @param string $id |
||
316 | * @param string $file |
||
317 | * @throws InvalidArgumentException when id not found or not a file |
||
318 | */ |
||
319 | public function setFile($id, $file) |
||
333 | |||
334 | /** |
||
335 | * @param AbstractQuery $query |
||
336 | * @param string $parent |
||
337 | * @return array |
||
338 | */ |
||
339 | public function queryIds(AbstractQuery $query, $parent = null) |
||
351 | } |
||
352 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..