for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Spatie\Crawler;
use GuzzleHttp\Exception\RequestException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriInterface;
abstract class CrawlObserver
{
/**
* Called when the crawler will crawl the url.
*
* @param \Psr\Http\Message\UriInterface $url
*/
public function willCrawl(UriInterface $url)
$url
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
}
* Called when the crawler has crawled the given url successfully.
* @param \Psr\Http\Message\ResponseInterface $response
* @param \Psr\Http\Message\UriInterface|null $foundOnUrl
abstract public function crawled(
UriInterface $url,
ResponseInterface $response,
?UriInterface $foundOnUrl = null
);
* Called when the crawler had a problem crawling the given url.
* @param \GuzzleHttp\Exception\RequestException $requestException
abstract public function crawlFailed(
RequestException $requestException,
* Called when the crawl has ended.
public function finishedCrawling()
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.