PHP Class Spatie\Crawler\CrawlQueue

Show file Open project: spatie/crawler Class Usage Examples

Public Properties

Property Type Description
$pending Illuminate\Support\Collection
$processed Illuminate\Support\Collection

Public Methods

Method Description
__construct ( )
add ( CrawlUrl $url )
getPendingUrlAtIndex ( integer $index ) : CrawlUrl | null
getPendingUrls ( ) : Collection
has ( CrawlUrl | Url $crawlUrl ) : boolean
hasAlreadyBeenProcessed ( CrawlUrl $url )
hasPendingUrls ( ) : boolean
markAsProcessed ( CrawlUrl $crawlUrl )
removeProcessedUrlsFromPending ( )

Protected Methods

Method Description
contains ( Collection $collection, CrawlUrl $searchCrawlUrl ) : boolean

Method Details

__construct() public method

public __construct ( )

add() public method

public add ( CrawlUrl $url )
$url CrawlUrl

contains() protected method

protected contains ( Collection $collection, CrawlUrl $searchCrawlUrl ) : boolean
$collection Illuminate\Support\Collection
$searchCrawlUrl CrawlUrl
return boolean

getPendingUrlAtIndex() public method

public getPendingUrlAtIndex ( integer $index ) : CrawlUrl | null
$index integer
return CrawlUrl | null

getPendingUrls() public method

public getPendingUrls ( ) : Collection
return Illuminate\Support\Collection

has() public method

public has ( CrawlUrl | Url $crawlUrl ) : boolean
$crawlUrl CrawlUrl | Url
return boolean

hasAlreadyBeenProcessed() public method

public hasAlreadyBeenProcessed ( CrawlUrl $url )
$url CrawlUrl

hasPendingUrls() public method

public hasPendingUrls ( ) : boolean
return boolean

markAsProcessed() public method

public markAsProcessed ( CrawlUrl $crawlUrl )
$crawlUrl CrawlUrl

removeProcessedUrlsFromPending() public method

Property Details

$pending public property

public Collection,Illuminate\Support $pending
return Illuminate\Support\Collection

$processed public property

public Collection,Illuminate\Support $processed
return Illuminate\Support\Collection