1: | <?php |
2: | namespace duyplus\tmdbapi\classes\jobs; |
3: | |
4: | /** |
5: | * This class handles all the data you can get from the api Configuration |
6: | * |
7: | * @package TMDB_V3_API_PHP |
8: | * @author Alvaro Octal |
9: | * @version 0.7 |
10: | * @date 20/01/2015 |
11: | * @updated 31/12/2024 |
12: | * @link https://github.com/duyplus/tmdbapi |
13: | * @copyright Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php) |
14: | */ |
15: | |
16: | class MovieJob |
17: | { |
18: | //------------------------------------------------------------------------------ |
19: | // Class Variables |
20: | //------------------------------------------------------------------------------ |
21: | |
22: | private $_data; |
23: | |
24: | /** |
25: | * Construct Class |
26: | * |
27: | * @param array $data An array with the data of a Movie job |
28: | */ |
29: | public function __construct($data, $ipPerson) |
30: | { |
31: | $this->_data = $data; |
32: | $this->_data['person_id'] = $ipPerson; |
33: | } |
34: | |
35: | //------------------------------------------------------------------------------ |
36: | // Get Variables |
37: | //------------------------------------------------------------------------------ |
38: | |
39: | /** |
40: | * Get the Movie's title |
41: | * |
42: | * @return string |
43: | */ |
44: | public function getMovieTitle() |
45: | { |
46: | return $this->_data['title']; |
47: | } |
48: | |
49: | /** |
50: | * Get the Movie's id |
51: | * |
52: | * @return int |
53: | */ |
54: | public function getMovieID() |
55: | { |
56: | return $this->_data['id']; |
57: | } |
58: | |
59: | /** |
60: | * Get the Movie's original title |
61: | * |
62: | * @return string |
63: | */ |
64: | public function getMovieOriginalTitle() |
65: | { |
66: | return $this->_data['original_title']; |
67: | } |
68: | |
69: | /** |
70: | * Get the Movie's release date |
71: | * |
72: | * @return string |
73: | */ |
74: | public function getMovieReleaseDate() |
75: | { |
76: | return $this->_data['release_date']; |
77: | } |
78: | |
79: | |
80: | /** |
81: | * Get the Movie's poster |
82: | * |
83: | * @return string |
84: | */ |
85: | public function getPoster() |
86: | { |
87: | return $this->_data['poster_path']; |
88: | } |
89: | |
90: | /** |
91: | * Get the name of the job |
92: | * |
93: | * @return string |
94: | */ |
95: | public function getMovieJob() |
96: | { |
97: | return $this->_data['job']; |
98: | } |
99: | |
100: | |
101: | /** |
102: | * Get the job department |
103: | * |
104: | * @return string |
105: | */ |
106: | public function getMovieDepartment() |
107: | { |
108: | return $this->_data['department']; |
109: | } |
110: | |
111: | /** |
112: | * Get the Movie's overview |
113: | * |
114: | * @return string |
115: | */ |
116: | public function getMovieOverview() |
117: | { |
118: | return $this->_data['overview']; |
119: | } |
120: | |
121: | |
122: | //------------------------------------------------------------------------------ |
123: | // Export |
124: | //------------------------------------------------------------------------------ |
125: | |
126: | /** |
127: | * Get the JSON representation of the Movie job |
128: | * |
129: | * @return string |
130: | */ |
131: | public function getJSON() |
132: | { |
133: | return json_encode($this->_data, JSON_PRETTY_PRINT); |
134: | } |
135: | } |
136: | ?> |