PHP Class Spatie\LinkChecker\Reporters\BaseReporter

Inheritance: implements Spatie\Crawler\CrawlObserver
Show file Open project: spatie/laravel-link-checker Class Usage Examples

Protected Properties

Property Type Description
$urlsGroupedByStatusCode array

Public Methods

Method Description
hasBeenCrawled ( Url $url, Psr\Http\Message\ResponseInterface | null $response ) : string Called when the crawler has crawled the given url.
hasBeenCrawled ( Url $url, Psr\Http\Message\ResponseInterface | null $response, Url $foundOnUrl = null ) : string Called when the crawler has crawled the given url.
willCrawl ( Url $url ) Called when the crawler will crawl the url.

Protected Methods

Method Description
crawledBadUrls ( ) : boolean Determine if the crawler saw some bad urls.
isSuccessOrRedirect ( integer $statusCode ) : boolean Determine if the statuscode concerns a successful or redirect response.

Method Details

crawledBadUrls() protected method

Determine if the crawler saw some bad urls.
protected crawledBadUrls ( ) : boolean
return boolean

hasBeenCrawled() public method

Called when the crawler has crawled the given url.
public hasBeenCrawled ( Url $url, Psr\Http\Message\ResponseInterface | null $response ) : string
$url Spatie\Crawler\Url
$response Psr\Http\Message\ResponseInterface | null
return string

hasBeenCrawled() public method

Called when the crawler has crawled the given url.
public hasBeenCrawled ( Url $url, Psr\Http\Message\ResponseInterface | null $response, Url $foundOnUrl = null ) : string
$url Spatie\Crawler\Url
$response Psr\Http\Message\ResponseInterface | null
$foundOnUrl Spatie\Crawler\Url
return string

isSuccessOrRedirect() protected method

Determine if the statuscode concerns a successful or redirect response.
protected isSuccessOrRedirect ( integer $statusCode ) : boolean
$statusCode integer
return boolean

willCrawl() public method

Called when the crawler will crawl the url.
public willCrawl ( Url $url )
$url Spatie\Crawler\Url

Property Details

$urlsGroupedByStatusCode protected property

protected array $urlsGroupedByStatusCode
return array