Skip to content

Commit

Permalink
Updating PHP DocBlocks for Movies, make sure all properties are marke…
Browse files Browse the repository at this point in the history
…d with their respective types.
  • Loading branch information
wtfzdotnet committed Nov 3, 2013
1 parent 3ce13f6 commit 7fbcb2e
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 18 deletions.
124 changes: 123 additions & 1 deletion lib/Tmdb/Model/Movie.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,24 @@

class Movie extends AbstractModel {

/**
* @var bool
*/
private $adult = false;

/**
* @var Image
*/
private $backdropPath;

/**
* @var Collection
*/
private $belongsToCollection = null;

/**
* @var int
*/
private $budget;

/**
Expand All @@ -40,26 +55,105 @@ class Movie extends AbstractModel {
* @var Common\Genres
*/
private $genres;

/**
* @var string
*/
private $homepage;

/**
* @var int
*/
private $id;

/**
* @var string
*/
private $imdbId;

/**
* @var string
*/
private $originalTitle;

/**
* @var string
*/
private $overview;

/**
* @var float
*/
private $popularity;

/**
* @var Image
*/
private $posterPath;

/**
* @var Collection
*/
private $productionCompanies;

/**
* @var Collection
*/
private $productionCountries;

/**
* @var \DateTime
*/
private $releaseDate;

/**
* @var int
*/
private $revenue;

/**
* @var int
*/
private $runtime;

/**
* @var Collection
*/
private $spokenLanguages;

/**
* @var string
*/
private $status;

/**
* @var string
*/
private $tagline;

/**
* @var title
*/
private $title;

/**
* @var float
*/
private $voteAverage;

/**
* @var int
*/
private $voteCount;

/**
* @var Collection
*/
protected $alternativeTitles;

/**
* @var Collection
*/
protected $changes;

/**
Expand All @@ -75,14 +169,42 @@ class Movie extends AbstractModel {
* @var Common\Collection\Images
*/
protected $images;

/**
* @var Collection
*/
protected $keywords;

/**
* @var Collection
*/
protected $lists;

/**
* @var Collection
*/
protected $releases;

/**
* @var Collection
*/
protected $similarMovies;

/**
* @var Collection
*/
protected $trailers;
protected $translations;

/**
* @var Collection
*/
protected $translations;

/**
* Properties that are available in the API
*
* @var array
*/
protected static $_properties = array(
'adult',
'backdrop_path',
Expand Down
20 changes: 3 additions & 17 deletions lib/Tmdb/Model/Movie/AlternativeTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,10 @@ class AlternativeTitle extends AbstractModel {
*/
public static function fromArray(Client $client, array $data)
{
$genre = new AlternativeTitle();
//$genre->setClient($client);
$title = new AlternativeTitle();
//$title->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);
return $title->hydrate($data);
}

/**
Expand Down

0 comments on commit 7fbcb2e

Please sign in to comment.