Overview   Package   Tree   Index 
IMDBPHP
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

MDBApi
Class movieposterdb

- mdb_config
-

class movieposterdb
extends mdb_base

Accessing posters, covers, etc. from movieposterdb.com

Authors:
Izzy (izzysoft AT qumran DOT org)
Version:
$Revision: 678 $ $Date: 2014-07-31 14:56:17 +0200 (Do, 31. Jul 2014) $
Copyright:
(c) 2009 by Itzchak Rehberg and IzzySoft

Constructor Summary
void movieposterdb(string $id, [integer $limit], [boolean $recurse], [object $mdb_config])
Initialize class

Method Summary
void add_lang(string $lang)
Restrict images to given languages.
array covers()
Get the cover images
array logos()
Get the logos
array others()
Get the "other" images
protected array parse_list([string $type])
Parse page for images
array posters()
Get the posters
void reset_lang()
Reset the language filter built by the add_lang method to its default (i.
void reset_vars()
Reset everything to start a new search
boolean save_image(string $url)
Save an image to the image dir The image will be retrieved from the passed URL and stored in the configured mdb::photodir, using the filename part of the URL specified.
void set_limit([integer $limit])
Set a limit (maximum images to retrieve)
void set_recurse([boolean $recurse])
Shall we recurse if multiple versions are offered?
array textless()
Get the textless images
array unsets()
Get the images having no category set

Methods inherited from class mdb_base and not overridden
cache_read, cache_write, get_pilot_imdbfill, getWebPage, imdbid, monthNo, openpage, purge, readCachedPage, set_pagename, set_pilot_imdbfill, setid, writeCachedPage

Constructor Detail

movieposterdb()

void movieposterdb(string $id, [integer $limit], [boolean $recurse], [object $mdb_config])

Initialize class

Parameters:
id - IMDBID to use for data retrieval
limit - maximum amount of images to retrieve (default: 20). Can be changed via set_limit()
recurse - whether to recurse if multiple versions are available (default: TRUE). Can be changed via set_recurse()
mdb_config -

Method Detail

add_lang()

void add_lang(string $lang)

Restrict images to given languages. By default, no restriction is active; you may call this method multiple times to add multiple languages (e.g. your native plus EN plus US), and use the reset_lang method to clean.

Parameters:
lang - two-letter ISO language code

covers()

array covers()

Get the cover images

Returns:
array of arrays[lang,url]

logos()

array logos()

Get the logos

Returns:
array of arrays[lang,url]

others()

array others()

Get the "other" images

Returns:
array of arrays[lang,url]

parse_list()

protected array parse_list([string $type])

Parse page for images

Parameters:
type - (what image URLs to retrieve: 'poster' (default), 'cover', 'textless', 'logo', 'other', 'unset')
Returns:
array of arrays[lang,url,title]

posters()

array posters()

Get the posters

Returns:
array of arrays[lang,url]

reset_lang()

void reset_lang()

Reset the language filter built by the add_lang method to its default (i.e. empty)


reset_vars()

void reset_vars()

Reset everything to start a new search

See also:
just a dummy to keep it compatible with previous versions.

save_image()

boolean save_image(string $url)

Save an image to the image dir The image will be retrieved from the passed URL and stored in the configured mdb::photodir, using the filename part of the URL specified.

Parameters:
url - full URL to the image
Returns:
success

set_limit()

void set_limit([integer $limit])

Set a limit (maximum images to retrieve)

Parameters:
limit - (default: 20)
See also:
just a dummy to keep it compatible with previous versions.

set_recurse()

void set_recurse([boolean $recurse])

Shall we recurse if multiple versions are offered?

Parameters:
recurse - (default: TRUE)
See also:
just a dummy to keep it compatible with previous versions.

textless()

array textless()

Get the textless images

Returns:
array of arrays[lang,url]

unsets()

array unsets()

Get the images having no category set

Returns:
array of arrays[lang,url]

 Overview   Package   Tree   Index 
IMDBPHP
PREV  NEXT Frames  No Frame 
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Submit a bug

This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stephane GALLAND (under the GNU General Public License)