PHP Class Imdb\MdbBase

Author: Georgos Giagas
Author: Izzy (izzysoft AT qumran DOT org)
Inheritance: extends Config
Datei anzeigen Open project: tboothman/imdbphp Class Usage Examples

Public Properties

Property Type Description
$version

Protected Properties

Property Type Description
$cache CacheInterface
$config Config
$imdbID 7 digit identifier for this person
$logger Psr\Log\LoggerInterface
$months
$page
$pages Pages

Public Methods

Method Description
__construct ( Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null )
imdbid ( ) : string Retrieve the IMDB ID

Protected Methods

Method Description
buildUrl ( string $context = null ) : string Overrideable method to build the URL used by getPage
debug_html ( $html )
debug_object ( $object )
debug_scalar ( $scalar ) #---------------------------------------------------------[ Debug helpers ]---
getPage ( string $context = null ) : string Get a page from IMDb, which will be cached in memory for repeated use
monthNo ( $mon ) : integer Get numerical value for month name
setid ( $id ) Set and validate the IMDb ID

Method Details

__construct() public method

public __construct ( Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null )
$config Config OPTIONAL override default config
$logger Psr\Log\LoggerInterface OPTIONAL override default logger
$cache CacheInterface OPTIONAL override default cache

buildUrl() protected method

Overrideable method to build the URL used by getPage
protected buildUrl ( string $context = null ) : string
$context string OPTIONAL
return string

debug_html() protected method

protected debug_html ( $html )

debug_object() protected method

protected debug_object ( $object )

debug_scalar() protected method

#---------------------------------------------------------[ Debug helpers ]---
protected debug_scalar ( $scalar )

getPage() protected method

Get a page from IMDb, which will be cached in memory for repeated use
protected getPage ( string $context = null ) : string
$context string Name of the page or some other context to build the URL with to retrieve the page
return string

imdbid() public method

Retrieve the IMDB ID
public imdbid ( ) : string
return string id IMDBID currently used

monthNo() protected method

Get numerical value for month name
protected monthNo ( $mon ) : integer
return integer month number

setid() protected method

Set and validate the IMDb ID
protected setid ( $id )

Property Details

$cache protected_oe property

protected CacheInterface $cache
return CacheInterface

$config protected_oe property

protected Config,imdb $config
return Config

$imdbID protected_oe property

7 digit identifier for this person
protected $imdbID

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$months protected_oe property

protected $months

$page protected_oe property

protected $page

$pages protected_oe property

protected Pages,imdb $pages
return Pages

$version public_oe property

public $version