diff --git a/.gitignore b/.gitignore index fdc69c93..50742799 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /composer.lock /*.php /.idea/ +/examples/ \ No newline at end of file diff --git a/lib/Tmdb/Api/Genres.php b/lib/Tmdb/Api/Genres.php index 79df8002..e41295a8 100644 --- a/lib/Tmdb/Api/Genres.php +++ b/lib/Tmdb/Api/Genres.php @@ -15,6 +15,26 @@ class Genres extends AbstractApi { + /** + * Get the list of genres, and return one by id + * + * @param integer $id + * @param array $options + * @return mixed + */ + public function getGenre($id, array $options = array()) + { + $response = $this->getGenres(); + + foreach($response['genres'] as $genre) { + if ($id == $genre['id']) { + return $genre; + } + } + + return null; + } + /** * Get the list of genres. * diff --git a/lib/Tmdb/Model/AbstractModel.php b/lib/Tmdb/Model/AbstractModel.php index 0863bf38..dca6694e 100644 --- a/lib/Tmdb/Model/AbstractModel.php +++ b/lib/Tmdb/Model/AbstractModel.php @@ -14,6 +14,9 @@ use Tmdb\Client; use Tmdb\Exception\RuntimeException; +use Tmdb\Model\Common\Genres; +use Tmdb\Model\Common\Images; +use Tmdb\Model\Common\People; class AbstractModel { protected static $_properties; @@ -69,7 +72,10 @@ public function hydrate(array $data = array()) if (!empty($data)) { foreach ($data as $k => $v) { if (in_array($k, static::$_properties)) { - $method = sprintf('set%s', ucfirst($k)); + + $method = $this->camelize( + sprintf('set_%s', $k) + ); if (!method_exists($this, $method)) { throw new RuntimeException(sprintf( @@ -86,4 +92,110 @@ public function hydrate(array $data = array()) return $this; } + + /** + * Collect all images from an `image` array ( containing e.g. posters / profiles etc. ) + * + * @param $client + * @param array $collection + * @return Images + */ + protected function collectImages($client, array $collection = array()) + { + $images = new Images(); + + foreach($collection as $collectionName => $itemCollection) { + foreach($itemCollection as $item) { + if (!is_array($item)) { + continue; + } + + $image = Image::fromArray($client, $item); + + $image->setType(Image::getTypeFromCollectionName($collectionName)); + + $images->addImage($image); + } + } + + return $images; + } + + /** + * Collect all people from an array + * + * @param $client + * @param array $collection + * @return People + */ + protected function collectPeople($client, array $collection = array()) + { + $people = new People(); + + foreach($collection as $item) { + $person = Person::fromArray($client, $item); + + $people->addPerson($person); + } + + return $people; + } + + /** + * Collect all people from an array + * + * @param $client + * @param array $collection + * @return People + */ + protected function collectGenres($client, array $collection = array()) + { + $genres = new Genres(); + + foreach($collection as $item) { + $genre = Genre::fromArray($client, $item); + $genres->addGenre($genre); + } + + return $genres; + } + + /** + * Transforms an under_scored_string to a camelCasedOne + * + * @see https://gist.github.com/troelskn/751517 + * + * @param $candidate + * @return string + */ + private function camelize($candidate) + { + return lcfirst( + implode('', + array_map('ucfirst', + array_map('strtolower', + explode('_', $candidate + ) + ) + ) + ) + ); + } + + /** + * Transforms a camelCasedString to an under_scored_one + * + * @see https://gist.github.com/troelskn/751517 + * + * @param $camelized + * @return string + */ + private function uncamelize($camelized) { + return implode('_', + array_map('strtolower', + preg_split('/([A-Z]{1}[^A-Z]*)/', $camelized, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY) + ) + ); + } + } \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/Changes.php b/lib/Tmdb/Model/Common/Changes.php new file mode 100644 index 00000000..9fe564ac --- /dev/null +++ b/lib/Tmdb/Model/Common/Changes.php @@ -0,0 +1,17 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common; + +class Images extends Collection { + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/Collection.php b/lib/Tmdb/Model/Common/Collection.php new file mode 100644 index 00000000..b7fcc0c2 --- /dev/null +++ b/lib/Tmdb/Model/Common/Collection.php @@ -0,0 +1,19 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common; + +use Guzzle\Common\Collection as GuzzleCollection; + +class Collection extends GuzzleCollection { + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/Genres.php b/lib/Tmdb/Model/Common/Genres.php new file mode 100644 index 00000000..e03258bb --- /dev/null +++ b/lib/Tmdb/Model/Common/Genres.php @@ -0,0 +1,54 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common; + +use Tmdb\Model\Genre; + +class Genres extends Collection { + + /** + * Returns all genres + * + * @return array + */ + public function getGenres() + { + return $this->data; + } + + /** + * Retrieve a genre from the collection + * + * @param $id + * @return null + */ + public function getGenre($id) { + foreach($this->data as $genre) { + if ($id === $genre->getId()) { + return $genre; + } + } + + return null; + } + + /** + * Add a genre to the collection + * + * @param Genre $genre + */ + public function addGenre(Genre $genre) + { + $this->data[] = $genre; + } +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/Images.php b/lib/Tmdb/Model/Common/Images.php new file mode 100644 index 00000000..e42424f1 --- /dev/null +++ b/lib/Tmdb/Model/Common/Images.php @@ -0,0 +1,54 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common; + +use Tmdb\Model\Image; + +class Images extends Collection { + + /** + * Returns all images + * + * @return array + */ + public function getImages() + { + return $this->data; + } + + /** + * Retrieve a image from the collection + * + * @param $id + * @return null + */ + public function getImage($id) { + foreach($this->data as $image) { + if ($id === $image->getId()) { + return $image; + } + } + + return null; + } + + /** + * Add a image to the collection + * + * @param Image $image + */ + public function addImage(Image $image) + { + $this->data[] = $image; + } +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/People.php b/lib/Tmdb/Model/Common/People.php new file mode 100644 index 00000000..2ef6dd20 --- /dev/null +++ b/lib/Tmdb/Model/Common/People.php @@ -0,0 +1,54 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common; + +use Tmdb\Model\Person; + +class People extends Collection { + + /** + * Returns all people + * + * @return array + */ + public function getPeople() + { + return $this->data; + } + + /** + * Retrieve a person from the collection + * + * @param $id + * @return null + */ + public function getPerson($id) { + foreach($this->data as $person) { + if ($id === $person->getId()) { + return $person; + } + } + + return null; + } + + /** + * Add a person to the collection + * + * @param Person $person + */ + public function addPerson(Person $person) + { + $this->data[] = $person; + } +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Common/People/Cast.php b/lib/Tmdb/Model/Common/People/Cast.php new file mode 100644 index 00000000..e4c60a67 --- /dev/null +++ b/lib/Tmdb/Model/Common/People/Cast.php @@ -0,0 +1,38 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Common\People; + +use Tmdb\Model\Common\People; +use Tmdb\Model\Person; + +class Cast extends People { + /** + * Returns all people + * + * @return People + */ + public function getCast() + { + return parent::getPeople(); + } + + /** + * Retrieve a cast member from the collection + * + * @param $id + * @return Person + */ + public function getCastMember($id) { + return parent::getPerson($id); + } +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Genre.php b/lib/Tmdb/Model/Genre.php new file mode 100644 index 00000000..d82b1c2e --- /dev/null +++ b/lib/Tmdb/Model/Genre.php @@ -0,0 +1,93 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model; + +use Tmdb\Client; + +class Genre extends AbstractModel { + + private $id; + private $name; + + protected static $_properties = array( + 'id', + 'name', + ); + + /** + * Convert an array to an hydrated object + * + * @param Client $client + * @param array $data + * @return $this + */ + public static function fromArray(Client $client, array $data) + { + $genre = new Genre($data['id']); + //$genre->setClient($client); + + return $genre->hydrate($data); + } + + /** + * Load a person with the given identifier + * + * @param Client $client + * @param $id + * @param $options + * @return $this + */ + public static function load(Client $client, $id, array $options = array()) { + $data = $client->api('genres')->getGenre($id, $options); + + return Genre::fromArray($client, $data); + } + + /** + * @param mixed $id + * @return $this + */ + public function setId($id) + { + $this->id = (int) $id; + return $this; + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param mixed $name + * @return $this + */ + public function setName($name) + { + $this->name = $name; + return $this; + } + + /** + * @return mixed + */ + public function getName() + { + return $this->name; + } + + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Image.php b/lib/Tmdb/Model/Image.php new file mode 100644 index 00000000..07298f22 --- /dev/null +++ b/lib/Tmdb/Model/Image.php @@ -0,0 +1,217 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model; + +use Tmdb\Client; + +class Image extends AbstractModel { + + const FORMAT_POSTER = 'poster'; + const FORMAT_BACKDROP = 'backdrop'; + const FORMAT_PROFILE = 'profile'; + const FORMAT_LOGO = 'logo'; + + private $filePath; + private $width; + private $height; + private $iso6391; + private $aspectRatio; + + protected $id; + protected $type; + + protected static $_properties = array( + 'file_path', + 'width', + 'height', + 'iso_639_1', + 'aspect_ratio' + ); + + protected static $_types = array( + 'posters' => self::FORMAT_POSTER, + 'backdrops' => self::FORMAT_BACKDROP, + 'profiles' => self::FORMAT_PROFILE, + 'logos' => self::FORMAT_LOGO + ); + + /** + * Convert an array to an hydrated object + * + * @param Client $client + * @param array $data + * @return $this + */ + public static function fromArray(Client $client, array $data) + { + $image = new Image(); + //$image->setClient($client); + + return $image->hydrate($data); + } + + /** + * Load a person with the given identifier + * + * @param Client $client + * @param $id + * @param $with + * @return $this + */ + public static function load(Client $client, $id, array $with = array()) { + $data = $client->api('people')->getPerson($id, $with); + + return Person::fromArray($client, $data); + } + + /** + * Get the singular type as defined in $_types + * + * @param $name + * @return mixed + */ + public static function getTypeFromCollectionName($name) + { + if (array_key_exists($name, self::$_types)) { + return self::$_types[$name]; + } + } + + /** + * @param mixed $aspectRatio + * @return $this + */ + public function setAspectRatio($aspectRatio) + { + $this->aspectRatio = $aspectRatio; + return $this; + } + + /** + * @return mixed + */ + public function getAspectRatio() + { + return $this->aspectRatio; + } + + /** + * @param mixed $filePath + * @return $this + */ + public function setFilePath($filePath) + { + $this->filePath = $filePath; + return $this; + } + + /** + * @return mixed + */ + public function getFilePath() + { + return $this->filePath; + } + + /** + * @param mixed $height + * @return $this + */ + public function setHeight($height) + { + $this->height = $height; + return $this; + } + + /** + * @return mixed + */ + public function getHeight() + { + return $this->height; + } + + /** + * @param mixed $id + * @return $this + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param mixed $iso6391 + * @return $this + */ + public function setIso6391($iso6391) + { + $this->iso6391 = $iso6391; + return $this; + } + + /** + * @return mixed + */ + public function getIso6391() + { + return $this->iso6391; + } + + /** + * @param mixed $type + * @return $this + */ + public function setType($type) + { + $this->type = $type; + return $this; + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @param mixed $width + * @return $this + */ + public function setWidth($width) + { + $this->width = $width; + return $this; + } + + /** + * @return mixed + */ + public function getWidth() + { + return $this->width; + } + + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Movie.php b/lib/Tmdb/Model/Movie.php new file mode 100644 index 00000000..95a9aad2 --- /dev/null +++ b/lib/Tmdb/Model/Movie.php @@ -0,0 +1,615 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model; + +use Tmdb\Client; +use Tmdb\Model\Common\Genres; +use Tmdb\Model\Common\Images; +use Tmdb\Model\Common\People; + +class Movie extends AbstractModel { + + private $adult = false; + private $backdropPath; + private $belongsToCollection = null; + private $homepage; + private $id; + private $imdbId; + private $originalTitle; + private $overview; + private $popularity; + private $posterPath; + private $productionCompanies; + private $productionCountries; + private $releaseDate; + private $revenue; + private $runtime; + private $spokenLanguages; + private $status; + private $tagline; + private $title; + private $voteAverage; + private $voteCount; + + /** + * Cast members + * + * @var Movie\Cast + */ + protected $cast; + + /** + * Crew members + * + * @var + */ + protected $crew; + + /** + * Genres + * + * @var Common\Genres + */ + protected $genres; + protected $images; + protected $changes; + + protected static $_properties = array( + 'adult', + 'backdropPath', + 'belongsToCollection', + 'homepage', + 'id', + 'imdbId', + 'originalTitle', + 'overview', + 'popularity', + 'posterPath', + 'productionCompanies', + 'productionCountries', + 'releaseDate', + 'revenue', + 'runtime', + 'spokenLanguages', + 'status', + 'tagline', + 'title', + 'voteAverage', + 'voteCount', + ); + + /** + * Constructor + */ + public function __construct() + { + $this->genres = new Common\Genres(); + $this->images = new Common\Images(); + $this->cast = new Movie\Cast(); + $this->crew = new People(); + } + + /** + * Convert an array to an hydrated object + * + * @param Client $client + * @param array $data + * @return $this + */ + public static function fromArray(Client $client, array $data) + { + $movie = new Movie($data['id']); + //$movie->setClient($client); + + if (array_key_exists('casts', $data)) { + $movie->setCast(parent::collectPeople($client, $data['casts']['cast'])); + } + + if (array_key_exists('crew', $data)) { + $movie->setCrew(parent::collectPeople($client, $data['casts']['crew'])); + } + + if (array_key_exists('genres', $data)) { + $movie->setGenres(parent::collectGenres($client, $data['genres'])); + } + + if (array_key_exists('images', $data)) { + $movie->setImages(parent::collectImages($client, $data['images'])); + } + + return $movie->hydrate($data); + } + + /** + * Load a movie with the given identifier + * + * @param Client $client + * @param $id + * @param $with + * @return $this + */ + public static function load(Client $client, $id, array $with = array()) { + $data = $client->api('movies')->getMovie($id, $with); + + return Movie::fromArray($client, $data); + } + + /** + * @param boolean $adult + * @return $this + */ + public function setAdult($adult) + { + $this->adult = $adult; + return $this; + } + + /** + * @return boolean + */ + public function getAdult() + { + return $this->adult; + } + + /** + * @param mixed $backdropPath + * @return $this + */ + public function setBackdropPath($backdropPath) + { + $this->backdropPath = $backdropPath; + return $this; + } + + /** + * @return mixed + */ + public function getBackdropPath() + { + return $this->backdropPath; + } + + /** + * @param null $belongsToCollection + * @return $this + */ + public function setBelongsToCollection($belongsToCollection) + { + $this->belongsToCollection = $belongsToCollection; + return $this; + } + + /** + * @return null + */ + public function getBelongsToCollection() + { + return $this->belongsToCollection; + } + + /** + * @param mixed $changes + * @return $this + */ + public function setChanges($changes) + { + $this->changes = $changes; + return $this; + } + + /** + * @return mixed + */ + public function getChanges() + { + return $this->changes; + } + + /** + * @param \Tmdb\Model\Common\Genres $genres + * @return $this + */ + public function setGenres(Genres $genres) + { + $this->genres = $genres; + return $this; + } + + /** + * @return \Tmdb\Model\Genre[] + */ + public function getGenres() + { + return $this->genres; + } + + /** + * @param mixed $homepage + * @return $this + */ + public function setHomepage($homepage) + { + $this->homepage = $homepage; + return $this; + } + + /** + * @return mixed + */ + public function getHomepage() + { + return $this->homepage; + } + + /** + * @param mixed $id + * @return $this + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param \Tmdb\Model\Common\Images $images + * @return $this + */ + public function setImages(Images $images) + { + $this->images = $images; + return $this; + } + + /** + * @return \Tmdb\Model\Image[] + */ + public function getImages() + { + return $this->images; + } + + /** + * @param mixed $imdbId + * @return $this + */ + public function setImdbId($imdbId) + { + $this->imdbId = $imdbId; + return $this; + } + + /** + * @return mixed + */ + public function getImdbId() + { + return $this->imdbId; + } + + /** + * @param mixed $originalTitle + * @return $this + */ + public function setOriginalTitle($originalTitle) + { + $this->originalTitle = $originalTitle; + return $this; + } + + /** + * @return mixed + */ + public function getOriginalTitle() + { + return $this->originalTitle; + } + + /** + * @param mixed $overview + * @return $this + */ + public function setOverview($overview) + { + $this->overview = $overview; + return $this; + } + + /** + * @return mixed + */ + public function getOverview() + { + return $this->overview; + } + + /** + * @param mixed $popularity + * @return $this + */ + public function setPopularity($popularity) + { + $this->popularity = $popularity; + return $this; + } + + /** + * @return mixed + */ + public function getPopularity() + { + return $this->popularity; + } + + /** + * @param mixed $posterPath + * @return $this + */ + public function setPosterPath($posterPath) + { + $this->posterPath = $posterPath; + return $this; + } + + /** + * @return mixed + */ + public function getPosterPath() + { + return $this->posterPath; + } + + /** + * @param mixed $productionCompanies + * @return $this + */ + public function setProductionCompanies($productionCompanies) + { + $this->productionCompanies = $productionCompanies; + return $this; + } + + /** + * @return mixed + */ + public function getProductionCompanies() + { + return $this->productionCompanies; + } + + /** + * @param mixed $productionCountries + * @return $this + */ + public function setProductionCountries($productionCountries) + { + $this->productionCountries = $productionCountries; + return $this; + } + + /** + * @return mixed + */ + public function getProductionCountries() + { + return $this->productionCountries; + } + + /** + * @param mixed $releaseDate + * @return $this + */ + public function setReleaseDate($releaseDate) + { + $this->releaseDate = $releaseDate; + return $this; + } + + /** + * @return mixed + */ + public function getReleaseDate() + { + return $this->releaseDate; + } + + /** + * @param mixed $revenue + * @return $this + */ + public function setRevenue($revenue) + { + $this->revenue = $revenue; + return $this; + } + + /** + * @return mixed + */ + public function getRevenue() + { + return $this->revenue; + } + + /** + * @param mixed $runtime + * @return $this + */ + public function setRuntime($runtime) + { + $this->runtime = $runtime; + return $this; + } + + /** + * @return mixed + */ + public function getRuntime() + { + return $this->runtime; + } + + /** + * @param mixed $spokenLanguages + * @return $this + */ + public function setSpokenLanguages($spokenLanguages) + { + $this->spokenLanguages = $spokenLanguages; + return $this; + } + + /** + * @return mixed + */ + public function getSpokenLanguages() + { + return $this->spokenLanguages; + } + + /** + * @param mixed $status + * @return $this + */ + public function setStatus($status) + { + $this->status = $status; + return $this; + } + + /** + * @return mixed + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param mixed $tagline + * @return $this + */ + public function setTagline($tagline) + { + $this->tagline = $tagline; + return $this; + } + + /** + * @return mixed + */ + public function getTagline() + { + return $this->tagline; + } + + /** + * @param mixed $title + * @return $this + */ + public function setTitle($title) + { + $this->title = $title; + return $this; + } + + /** + * @return mixed + */ + public function getTitle() + { + return $this->title; + } + + /** + * @param mixed $voteAverage + * @return $this + */ + public function setVoteAverage($voteAverage) + { + $this->voteAverage = $voteAverage; + return $this; + } + + /** + * @return mixed + */ + public function getVoteAverage() + { + return $this->voteAverage; + } + + /** + * @param mixed $voteCount + * @return $this + */ + public function setVoteCount($voteCount) + { + $this->voteCount = $voteCount; + return $this; + } + + /** + * @return mixed + */ + public function getVoteCount() + { + return $this->voteCount; + } + + /** + * @param \Tmdb\Model\Common\People $cast + * @return $this + */ + public function setCast(People $cast) + { + $this->cast = $cast; + return $this; + } + + /** + * @return \Tmdb\Model\Common\People + */ + public function getCast() + { + return $this->cast; + } + + /** + * @param mixed $crew + * @return $this + */ + public function setCrew($crew) + { + $this->crew = $crew; + return $this; + } + + /** + * @return mixed + */ + public function getCrew() + { + return $this->crew; + } + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Movie/Cast.php b/lib/Tmdb/Model/Movie/Cast.php new file mode 100644 index 00000000..3556d9ee --- /dev/null +++ b/lib/Tmdb/Model/Movie/Cast.php @@ -0,0 +1,19 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Movie; + +use Tmdb\Model\Common\People\Cast as BaseCast; + +class Cast extends BaseCast { + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Person.php b/lib/Tmdb/Model/Person.php new file mode 100644 index 00000000..9ac83b4a --- /dev/null +++ b/lib/Tmdb/Model/Person.php @@ -0,0 +1,352 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model; + +use Tmdb\Client; + +class Person extends AbstractModel { + + private $adult; + private $alsoKnownAs = array(); + private $biography; + private $birthday; + private $deathday; + private $homepage; + private $id; + private $name; + private $department; + private $job; + private $placeOfBirth; + private $profilePath; + + protected $credits; + protected $images; + protected $changes; + + protected static $_properties = array( + 'adult', + 'also_known_as', + 'biography', + 'birthday', + 'deathday', + 'homepage', + 'id', + 'name', + 'place_of_birth', + 'profile_path', + ); + + /** + * Convert an array to an hydrated object + * + * @param Client $client + * @param array $data + * @return $this + */ + public static function fromArray(Client $client, array $data) + { + $person = new Person($data['id']); + //$person->setClient($client); + + if (array_key_exists('images', $data)) { + $data['images'] = parent::collectImages($client, $data['images']); + } + + return $person->hydrate($data); + } + + /** + * Load a person with the given identifier + * + * @param Client $client + * @param $id + * @param $with + * @return $this + */ + public static function load(Client $client, $id, array $with = array()) { + $data = $client->api('people')->getPerson($id, $with); + + return Person::fromArray($client, $data); + } + + /** + * @param mixed $adult + * @return $this + */ + public function setAdult($adult) + { + $this->adult = $adult; + return $this; + } + + /** + * @return mixed + */ + public function getAdult() + { + return $this->adult; + } + + /** + * @param mixed $alsoKnownAs + * @return $this + */ + public function setAlsoKnownAs($alsoKnownAs) + { + $this->alsoKnownAs = $alsoKnownAs; + return $this; + } + + /** + * @return mixed + */ + public function getAlsoKnownAs() + { + return $this->alsoKnownAs; + } + + /** + * @param mixed $biography + * @return $this + */ + public function setBiography($biography) + { + $this->biography = $biography; + return $this; + } + + /** + * @return mixed + */ + public function getBiography() + { + return $this->biography; + } + + /** + * @param mixed $birthday + * @return $this + */ + public function setBirthday($birthday) + { + $this->birthday = $birthday; + return $this; + } + + /** + * @return mixed + */ + public function getBirthday() + { + return $this->birthday; + } + + /** + * @param mixed $changes + * @return $this + */ + public function setChanges($changes) + { + $this->changes = $changes; + return $this; + } + + /** + * @return mixed + */ + public function getChanges() + { + return $this->changes; + } + + /** + * @param mixed $credits + * @return $this + */ + public function setCredits($credits) + { + $this->credits = $credits; + return $this; + } + + /** + * @return mixed + */ + public function getCredits() + { + return $this->credits; + } + + /** + * @param mixed $deathday + * @return $this + */ + public function setDeathday($deathday) + { + $this->deathday = $deathday; + return $this; + } + + /** + * @return mixed + */ + public function getDeathday() + { + return $this->deathday; + } + + /** + * @param mixed $homepage + * @return $this + */ + public function setHomepage($homepage) + { + $this->homepage = $homepage; + return $this; + } + + /** + * @return mixed + */ + public function getHomepage() + { + return $this->homepage; + } + + /** + * @param mixed $id + * @return $this + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param mixed $images + * @return $this + */ + public function setImages($images) + { + $this->images = $images; + return $this; + } + + /** + * @return mixed + */ + public function getImages() + { + return $this->images; + } + + /** + * @param mixed $name + * @return $this + */ + public function setName($name) + { + $this->name = $name; + return $this; + } + + /** + * @return mixed + */ + public function getName() + { + return $this->name; + } + + /** + * @param mixed $placeOfBirth + * @return $this + */ + public function setPlaceOfBirth($placeOfBirth) + { + $this->placeOfBirth = $placeOfBirth; + return $this; + } + + /** + * @return mixed + */ + public function getPlaceOfBirth() + { + return $this->placeOfBirth; + } + + /** + * @param mixed $profilePath + * @return $this + */ + public function setProfilePath($profilePath) + { + $this->profilePath = $profilePath; + return $this; + } + + /** + * @return mixed + */ + public function getProfilePath() + { + return $this->profilePath; + } + + /** + * @param mixed $department + * @return $this + */ + public function setDepartment($department) + { + $this->department = $department; + return $this; + } + + /** + * @return mixed + */ + public function getDepartment() + { + return $this->department; + } + + /** + * @param mixed $job + * @return $this + */ + public function setJob($job) + { + $this->job = $job; + return $this; + } + + /** + * @return mixed + */ + public function getJob() + { + return $this->job; + } + +} \ No newline at end of file diff --git a/lib/Tmdb/Model/Tv/Cast.php b/lib/Tmdb/Model/Tv/Cast.php new file mode 100644 index 00000000..8ac8dc07 --- /dev/null +++ b/lib/Tmdb/Model/Tv/Cast.php @@ -0,0 +1,19 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Model\Tv; + +use Tmdb\Model\Common\People\Cast as BaseCast; + +class Cast extends BaseCast { + +} \ No newline at end of file