PHP Class Imdb\Pages

Afficher le fichier Open project: tboothman/imdbphp Class Usage Examples

Protected Properties

Свойство Type Description
$cache CacheInterface
$config Config
$logger Psr\Log\LoggerInterface
$name
$pages

Méthodes publiques

Méthode Description
__construct ( Config $config, CacheInterface $cache, Psr\Log\LoggerInterface $logger )
get ( $url ) : string Retrieve the content of the specified $url Caching will be used where possible

Méthodes protégées

Méthode Description
buildRequest ( $url )
getCacheKey ( $url )
getFromCache ( $url )
requestPage ( $url ) : string Request the page from IMDb
saveToCache ( $url, $page )

Method Details

__construct() public méthode

public __construct ( Config $config, CacheInterface $cache, Psr\Log\LoggerInterface $logger )
$config Config
$cache CacheInterface
$logger Psr\Log\LoggerInterface

buildRequest() protected méthode

protected buildRequest ( $url )

get() public méthode

Retrieve the content of the specified $url Caching will be used where possible
public get ( $url ) : string
Résultat string

getCacheKey() protected méthode

protected getCacheKey ( $url )

getFromCache() protected méthode

protected getFromCache ( $url )

requestPage() protected méthode

Request the page from IMDb
protected requestPage ( $url ) : string
$url
Résultat string Page html. Empty string on failure

saveToCache() protected méthode

protected saveToCache ( $url, $page )

Property Details

$cache protected_oe property

protected CacheInterface $cache
Résultat CacheInterface

$config protected_oe property

protected Config,imdb $config
Résultat Config

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
Résultat Psr\Log\LoggerInterface

$name protected_oe property

protected $name

$pages protected_oe property

protected $pages