PHP Class Imdb\Person

Author: Izzy (izzysoft AT qumran DOT org)
Inheritance: extends MdbBase
Show file Open project: tboothman/imdbphp Class Usage Examples

Protected Properties

Property Type Description
$SearchDetails SearchDetails
$actorsfilms
$actressfilms
$allfilms
$archivefilms
$bio_bio
$bio_salary
$bio_tm
$bio_trivia
$birth_name "Bio" page:
$birthday
$bodyheight
$crewsfilms
$deathday
$directorsfilms
$fullname
$main_photo "Name" page:
$nick_name
$producersfilms
$pub_articles
$pub_interviews
$pub_magcovers
$pub_movies
$pub_pictorial
$pub_prints "Publicity" page:
$selffilms
$soundtrackfilms
$spouses
$thanxfilms
$titleTypeMap
$writerfilms

Public Methods

Method Description
__construct ( $id, Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null )
articles ( ) : array Articles
bio ( ) : array Get the person's mini bio
birthname ( ) : string Get the birth name
born ( ) : array | null Get Birthday
died ( ) : array Get Deathday
fromSearchResults ( $id, $name, Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null )
getSearchDetails ( ) : array Get the search details They are just set when the imdb_person object has been initialized by the imdbpsearch class
height ( ) : array Get the body height
imdbid ( ) : string Retrieve the IMDB ID
interviews ( ) : array Interviews
magcovers ( ) : array Magazine cover photos
main_url ( ) : string Set up the URL to the movie title page
movies_actor ( ) : array Get an actor or actress' filmography
movies_actress ( )
movies_all ( ) : array Get complete filmography This method ignores the categories and tries to collect the complete filmography. Useful e.g. for pages without categories on. It may, however, contain duplicates if there are categories and a movie is listed in more than one of them
movies_archive ( ) : array Get "Archive Footage" filmography
movies_crew ( ) : array Get "Misc Crew" filmography
movies_director ( ) : array Get directors filmography
movies_producer ( ) : array Get producers filmography
movies_self ( ) : array Get "Self" filmography
movies_soundtrack ( ) : array Get soundtrack filmography
movies_thanx ( ) : array Get "Thanx" filmography
movies_writer ( ) : array Get writers filmography
name ( ) : string Get the name of the person
nickname ( ) : array Get the nick name
photo ( $thumb = true ) : mixed Get cover photo
photo_localurl ( $thumb = true ) : mixed Get the URL for the movies cover photo
pictorials ( ) : array Pictorials
pubmovies ( ) : array Biographical Movies
pubportraits ( ) : array List of movies protraying the person
pubprints ( ) : array Print media about this person
quotes ( ) : array Get the Personal Quotes
salary ( ) : array Get the salary list
savephoto ( $path, $thumb = TRUE, $rerun = FALSE ) : boolean Save the photo to disk
setSearchDetails ( $role, $mid, $name, $year ) Set some search details
spouse ( ) : array Get spouse(s)
trademark ( ) : array Get the "trademarks" of the person
trivia ( ) : array Get the Trivia

Protected Methods

Method Description
buildUrl ( $page = null )
filmograf ( &$res, $type ) Get filmography
getPage ( $page = null )
getUrlSuffix ( string $pageName ) : string
parparse ( $name, &$res ) Parse Trivia, Quotes, etc (same structs)
parsearticles ( &$res, $page, $title ) Helper for article parsing
parsepubmovies ( &$res, $page, $header ) Parse movie helper

Method Details

__construct() public method

public __construct ( $id, 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

articles() public method

Articles
See also: IMDB person page /publicity
public articles ( ) : array
return array articles array[0..n] of array[inturl,name,date,details,auturl,author] where all elements are strings - just date is an array[day,month,mon,year,full] (full: as displayed on the IMDB site)

bio() public method

Get the person's mini bio
See also: IMDB person page /bio
public bio ( ) : array
return array bio array [0..n] of array[string desc, array author[url,name]]

birthname() public method

Get the birth name
See also: IMDB person page /bio
public birthname ( ) : string
return string birthname

born() public method

Get Birthday
See also: IMDB person page /bio
public born ( ) : array | null
return array | null birthday [day,month,mon,year,place] where month is the month name, and mon the month number

buildUrl() protected method

protected buildUrl ( $page = null )

died() public method

Get Deathday
See also: IMDB person page /bio
public died ( ) : array
return array deathday [day,month.mon,year,place,cause] where month is the month name, and mon the month number

filmograf() protected method

Get filmography
protected filmograf ( &$res, $type )

fromSearchResults() public static method

public static fromSearchResults ( $id, $name, Config $config = null, Psr\Log\LoggerInterface $logger = null, CacheInterface $cache = null )
$config Config
$logger Psr\Log\LoggerInterface
$cache CacheInterface

getPage() protected method

protected getPage ( $page = null )

getSearchDetails() public method

Get the search details They are just set when the imdb_person object has been initialized by the imdbpsearch class
public getSearchDetails ( ) : array
return array SearchDetails (mid,name,role,moviename,year)

getUrlSuffix() protected method

protected getUrlSuffix ( string $pageName ) : string
$pageName string internal name of the page
return string

height() public method

Get the body height
See also: IMDB person page /bio
public height ( ) : array
return array [imperial,metric] height in feet and inch (imperial) an meters (metric)

imdbid() public method

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

interviews() public method

Interviews
See also: IMDB person page /publicity
public interviews ( ) : array
return array interviews array[0..n] of array[inturl,name,date,details,auturl,author] where all elements are strings - just date is an array[day,month,mon,year,full] (full: as displayed on the IMDB site)

magcovers() public method

Magazine cover photos
See also: IMDB person page /publicity
public magcovers ( ) : array
return array magcovers array[0..n] of array[inturl,name,date,details,auturl,author] where all elements are strings - just date is an array[day,month,mon,year,full] (full: as displayed on the IMDB site)

main_url() public method

Set up the URL to the movie title page
public main_url ( ) : string
return string url full URL to the current movies main page

movies_actor() public method

Get an actor or actress' filmography
See also: IMDB person page / (Main page)
public movies_actor ( ) : array
return array array[0..n][mid,name,year,title_type,chid,chname,addons], where chid is the character IMDB ID, chname the character name, and addons an array of additional remarks (the things in parenthesis)

movies_actress() public method

Deprecation: Use self::movies_actor() instead
public movies_actress ( )

movies_all() public method

Get complete filmography This method ignores the categories and tries to collect the complete filmography. Useful e.g. for pages without categories on. It may, however, contain duplicates if there are categories and a movie is listed in more than one of them
See also: IMDB person page / (Main page)
public movies_all ( ) : array
return array array[0..n][mid,name,year,title_type,chid,chname,addons], where chid is the character IMDB ID, chname the character name, and addons an array of additional remarks (the things in parenthesis)

movies_archive() public method

Get "Archive Footage" filmography
See also: IMDB person page / (Main page)
public movies_archive ( ) : array
return array array[0..n][mid,name,year,chid,chname], where chid is the character IMDB ID, and chname the character name

movies_crew() public method

Get "Misc Crew" filmography
See also: IMDB person page / (Main page)
public movies_crew ( ) : array
return array array[0..n][mid,name,year]

movies_director() public method

Get directors filmography
See also: IMDB person page / (Main page)
public movies_director ( ) : array
return array array[0..n][mid,name,year]

movies_producer() public method

Get producers filmography
See also: IMDB person page / (Main page)
public movies_producer ( ) : array
return array array[0..n][mid,name,year,title_type,chid,chname,addons], where chid is the character IMDB ID, chname the character name, and addons an array of additional remarks (the things in parenthesis)

movies_self() public method

Get "Self" filmography
See also: IMDB person page / (Main page)
public movies_self ( ) : array
return array array[0..n][mid,name,year,chid,chname], where chid is the character IMDB ID, and chname the character name

movies_soundtrack() public method

Get soundtrack filmography
See also: IMDB person page / (Main page)
public movies_soundtrack ( ) : array
return array array[0..n][mid,name,year]

movies_thanx() public method

Get "Thanx" filmography
See also: IMDB person page / (Main page)
public movies_thanx ( ) : array
return array array[0..n][mid,name,year]

movies_writer() public method

Get writers filmography
See also: IMDB person page / (Main page)
public movies_writer ( ) : array
return array array[0..n][mid,name,year,chid,chname], where chid is the character IMDB ID, and chname the character name

name() public method

Get the name of the person
See also: IMDB person page / (Main page)
public name ( ) : string
return string name full name of the person

nickname() public method

Get the nick name
See also: IMDB person page /bio
public nickname ( ) : array
return array nicknames array[0..n] of strings

parparse() protected method

Parse Trivia, Quotes, etc (same structs)
protected parparse ( $name, &$res )

parsearticles() protected method

Helper for article parsing
See also: IMDB person page /publicity
protected parsearticles ( &$res, $page, $title )

parsepubmovies() protected method

Parse movie helper
protected parsepubmovies ( &$res, $page, $header )

photo() public method

Get cover photo
See also: IMDB person page / (Main page)
public photo ( $thumb = true ) : mixed
return mixed photo (string url if found, FALSE otherwise)

photo_localurl() public method

Get the URL for the movies cover photo
See also: IMDB person page / (Main page)
public photo_localurl ( $thumb = true ) : mixed
return mixed url (string URL or FALSE if none)

pictorials() public method

Pictorials
See also: IMDB person page /publicity
public pictorials ( ) : array
return array pictorials array[0..n] of array[inturl,name,date,details,auturl,author] where all elements are strings - just date is an array[day,month,mon,year,full] (full: as displayed on the IMDB site)

pubmovies() public method

Biographical Movies
See also: IMDB person page /publicity
public pubmovies ( ) : array
return array pubmovies array[0..n] of array[imdb,name,year]

pubportraits() public method

List of movies protraying the person
See also: IMDB person page /publicity
public pubportraits ( ) : array
return array pubmovies array[0..n] of array[imdb,name,year]

pubprints() public method

Print media about this person
See also: IMDB person page /publicity
public pubprints ( ) : array
return array prints array[0..n] of array[author,title,place,publisher,year,isbn,url], where "place" refers to the place of publication, and "url" is a link to the ISBN

quotes() public method

Get the Personal Quotes
See also: IMDB person page /bio
public quotes ( ) : array
return array quotes array[0..n] of string

salary() public method

Get the salary list
See also: IMDB person page /bio
public salary ( ) : array
return array salary array[0..n] of array movie[strings imdb,name,year], string salary

savephoto() public method

Save the photo to disk
See also: IMDB person page / (Main page)
public savephoto ( $path, $thumb = TRUE, $rerun = FALSE ) : boolean
return boolean success

setSearchDetails() public method

Set some search details
public setSearchDetails ( $role, $mid, $name, $year )

spouse() public method

Get spouse(s)
See also: IMDB person page /bio
public spouse ( ) : array
return array [0..n] of array spouses [string imdb, string name, array from, array to, string comment, string children], where from/to are array [day,month,mon,year] (month is the name, mon the number of the month), comment usually is "divorced" (ouch), children is the number of children

trademark() public method

Get the "trademarks" of the person
See also: IMDB person page /bio
public trademark ( ) : array
return array trademarks array[0..n] of strings

trivia() public method

Get the Trivia
See also: IMDB person page /bio
public trivia ( ) : array
return array trivia array[0..n] of string

Property Details

$SearchDetails protected property

SearchDetails
protected $SearchDetails

$actorsfilms protected property

protected $actorsfilms

$actressfilms protected property

protected $actressfilms

$allfilms protected property

protected $allfilms

$archivefilms protected property

protected $archivefilms

$bio_bio protected property

protected $bio_bio

$bio_salary protected property

protected $bio_salary

$bio_tm protected property

protected $bio_tm

$bio_trivia protected property

protected $bio_trivia

$birth_name protected property

"Bio" page:
protected $birth_name

$birthday protected property

protected $birthday

$bodyheight protected property

protected $bodyheight

$crewsfilms protected property

protected $crewsfilms

$deathday protected property

protected $deathday

$directorsfilms protected property

protected $directorsfilms

$fullname protected property

protected $fullname

$main_photo protected property

"Name" page:
protected $main_photo

$nick_name protected property

protected $nick_name

$producersfilms protected property

protected $producersfilms

$pub_articles protected property

protected $pub_articles

$pub_interviews protected property

protected $pub_interviews

$pub_magcovers protected property

protected $pub_magcovers

$pub_movies protected property

protected $pub_movies

$pub_pictorial protected property

protected $pub_pictorial

$pub_prints protected property

"Publicity" page:
protected $pub_prints

$selffilms protected property

protected $selffilms

$soundtrackfilms protected property

protected $soundtrackfilms

$spouses protected property

protected $spouses

$thanxfilms protected property

protected $thanxfilms

$titleTypeMap protected property

protected $titleTypeMap

$writerfilms protected property

protected $writerfilms