PHP Класс Spatie\HttpStatusCheck\CrawlLogger

Наследование: implements Spatie\Crawler\CrawlObserver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$consoleOutput Symfony\Component\Console\Output\OutputInterface
$crawledUrls array
$outputFile string | null

Открытые методы

Метод Описание
__construct ( Symfony\Component\Console\Output\OutputInterface $consoleOutput )
finishedCrawling ( ) Called when the crawl has ended.
hasBeenCrawled ( Url $url, Psr\Http\Message\ResponseInterface | null $response, Url $foundOn = null ) Called when the crawler has crawled the given url.
setOutputFile ( string $filename ) Set the filename to write the output log.
startsWith ( string | null $haystack, string | array $needles ) : boolean
willCrawl ( Url $url ) Called when the crawl will crawl the url.

Защищенные методы

Метод Описание
getColorTagForStatusCode ( string $code ) : string

Описание методов

__construct() публичный Метод

public __construct ( Symfony\Component\Console\Output\OutputInterface $consoleOutput )
$consoleOutput Symfony\Component\Console\Output\OutputInterface

finishedCrawling() публичный Метод

Called when the crawl has ended.
public finishedCrawling ( )

getColorTagForStatusCode() защищенный Метод

protected getColorTagForStatusCode ( string $code ) : string
$code string
Результат string

hasBeenCrawled() публичный Метод

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

setOutputFile() публичный Метод

Set the filename to write the output log.
public setOutputFile ( string $filename )
$filename string

startsWith() публичный Метод

public startsWith ( string | null $haystack, string | array $needles ) : boolean
$haystack string | null
$needles string | array
Результат boolean

willCrawl() публичный Метод

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

Описание свойств

$consoleOutput защищенное свойство

protected OutputInterface,Symfony\Component\Console\Output $consoleOutput
Результат Symfony\Component\Console\Output\OutputInterface

$crawledUrls защищенное свойство

protected array $crawledUrls
Результат array

$outputFile защищенное свойство

protected string|null $outputFile
Результат string | null