|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace vfalies\tmdb\Results; |
|
4
|
|
|
|
|
5
|
|
|
use vfalies\tmdb\Abstracts\Results; |
|
6
|
|
|
use vfalies\tmdb\Tmdb; |
|
7
|
|
|
use vfalies\tmdb\Interfaces\Results\MovieResultsInterface; |
|
8
|
|
|
use vfalies\tmdb\Traits\ElementTrait; |
|
9
|
|
|
use vfalies\tmdb\Traits\Results\ShowTrait; |
|
10
|
|
|
|
|
11
|
|
|
class Movie extends Results implements MovieResultsInterface |
|
12
|
|
|
{ |
|
13
|
|
|
use ElementTrait; |
|
14
|
|
|
use ShowTrait; |
|
15
|
|
|
|
|
16
|
|
|
protected $overview = null; |
|
17
|
|
|
protected $release_date = null; |
|
18
|
|
|
protected $original_title = null; |
|
19
|
|
|
protected $title = null; |
|
20
|
|
|
protected $poster_path = null; |
|
21
|
|
|
protected $backdrop_path = null; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Constructor |
|
25
|
|
|
* @param \vfalies\tmdb\Tmdb $tmdb |
|
26
|
|
|
* @param \stdClass $result |
|
27
|
|
|
*/ |
|
28
|
8 |
|
public function __construct(Tmdb $tmdb, \stdClass $result) |
|
29
|
|
|
{ |
|
30
|
8 |
|
parent::__construct($tmdb, $result); |
|
31
|
|
|
|
|
32
|
|
|
// Populate data |
|
33
|
7 |
|
$this->id = $this->data->id; |
|
34
|
7 |
|
$this->overview = $this->data->overview; |
|
35
|
7 |
|
$this->release_date = $this->data->release_date; |
|
36
|
7 |
|
$this->original_title = $this->data->original_title; |
|
37
|
7 |
|
$this->title = $this->data->title; |
|
38
|
7 |
|
$this->poster_path = $this->data->poster_path; |
|
39
|
7 |
|
$this->backdrop_path = $this->data->backdrop_path; |
|
40
|
7 |
|
} |
|
41
|
|
|
|
|
42
|
|
|
// /** |
|
43
|
|
|
// * Get movie ID |
|
44
|
|
|
// * @return int |
|
45
|
|
|
// */ |
|
46
|
|
|
// public function getId() |
|
47
|
|
|
// { |
|
48
|
|
|
// return (int) $this->id; |
|
49
|
|
|
// } |
|
50
|
|
|
// |
|
51
|
|
|
// /** |
|
52
|
|
|
// * Get movie overview |
|
53
|
|
|
// * @return string |
|
54
|
|
|
// */ |
|
55
|
|
|
// public function getOverview() |
|
56
|
|
|
// { |
|
57
|
|
|
// return $this->overview; |
|
58
|
|
|
// } |
|
59
|
|
|
// |
|
60
|
|
|
// /** |
|
61
|
|
|
// * Get movie release date |
|
62
|
|
|
// * @return string |
|
63
|
|
|
// */ |
|
64
|
|
|
// public function getReleaseDate() |
|
65
|
|
|
// { |
|
66
|
|
|
// return $this->release_date; |
|
67
|
|
|
// } |
|
68
|
|
|
// |
|
69
|
|
|
// /** |
|
70
|
|
|
// * Get movie original title |
|
71
|
|
|
// * @return string |
|
72
|
|
|
// */ |
|
73
|
|
|
// public function getOriginalTitle() |
|
74
|
|
|
// { |
|
75
|
|
|
// return $this->original_title; |
|
76
|
|
|
// } |
|
77
|
|
|
// |
|
78
|
|
|
// /** |
|
79
|
|
|
// * Get movie title |
|
80
|
|
|
// * @return string |
|
81
|
|
|
// */ |
|
82
|
|
|
// public function getTitle() |
|
83
|
|
|
// { |
|
84
|
|
|
// return $this->title; |
|
85
|
|
|
// } |
|
86
|
|
|
} |
|
87
|
|
|
|