1 | <?php |
||
9 | abstract class CrawlObserver |
||
10 | { |
||
11 | /** |
||
12 | * Called when the crawler will crawl the url. |
||
13 | * |
||
14 | * @param \Psr\Http\Message\UriInterface $url |
||
15 | */ |
||
16 | public function willCrawl(UriInterface $url) |
||
|
|||
17 | { |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Called when the crawler has crawled the given url successfully. |
||
22 | * |
||
23 | * @param \Psr\Http\Message\UriInterface $url |
||
24 | * @param \Psr\Http\Message\ResponseInterface $response |
||
25 | * @param \Psr\Http\Message\UriInterface|null $foundOnUrl |
||
26 | */ |
||
27 | abstract public function crawled( |
||
32 | |||
33 | /** |
||
34 | * Called when the crawler had a problem crawling the given url. |
||
35 | * |
||
36 | * @param \Psr\Http\Message\UriInterface $url |
||
37 | * @param \GuzzleHttp\Exception\RequestException $requestException |
||
38 | * @param \Psr\Http\Message\UriInterface|null $foundOnUrl |
||
39 | */ |
||
40 | abstract public function crawlFailed( |
||
45 | |||
46 | /** |
||
47 | * Called when the crawl has ended. |
||
48 | */ |
||
49 | public function finishedCrawling() |
||
52 | } |
||
53 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.