PHP Class Knp\Bundle\KnpBundlesBundle\Finder\CommonFinder

Inheritance: extends AbstractBaseFinder
Datei anzeigen Open project: KnpLabs/KnpBundles

Protected Properties

Property Type Description
$browser Buzz\Browser

Public Methods

Method Description
find ( ) {@inheritDoc}
setBrowser ( Buzz\Browser $browser )

Protected Methods

Method Description
buildUrl ( integer $page ) : string Returns the URL to perform the search
extractPageUrls ( Crawler $crawler ) : array Extracts the urls from the given google results crawler
extractUrlRepository ( string $url ) : string Returns the github repository extracted from the given URL
findPage ( integer $page ) : array Finds the repositories of the specified page url

Private Methods

Method Description
doRequest ( integer $page ) : Crawler

Method Details

buildUrl() abstract protected method

Returns the URL to perform the search
abstract protected buildUrl ( integer $page ) : string
$page integer The page number (default 1)
return string

extractPageUrls() abstract protected method

Extracts the urls from the given google results crawler
abstract protected extractPageUrls ( Crawler $crawler ) : array
$crawler Symfony\Component\DomCrawler\Crawler
return array

extractUrlRepository() abstract protected method

Returns the github repository extracted from the given URL
abstract protected extractUrlRepository ( string $url ) : string
$url string
return string or NULL if the URL does not contain any repository

find() public method

{@inheritDoc}
public find ( )

findPage() protected method

Finds the repositories of the specified page url
protected findPage ( integer $page ) : array
$page integer
return array

setBrowser() public method

public setBrowser ( Buzz\Browser $browser )
$browser Buzz\Browser

Property Details

$browser protected_oe property

protected Browser,Buzz $browser
return Buzz\Browser