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 TVShowJob |
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 TVShow 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 TVShow's title |
41: | * |
42: | * @return string |
43: | */ |
44: | public function getTVShowName() |
45: | { |
46: | return $this->_data['name']; |
47: | } |
48: | |
49: | /** |
50: | * Get the TVShow's id |
51: | * |
52: | * @return int |
53: | */ |
54: | public function getTVShowID() |
55: | { |
56: | return $this->_data['id']; |
57: | } |
58: | |
59: | /** |
60: | * Get the TVShow's original title |
61: | * |
62: | * @return string |
63: | */ |
64: | public function getTVShowOriginalTitle() |
65: | { |
66: | return $this->_data['original_name']; |
67: | } |
68: | |
69: | /** |
70: | * Get the TVShow's release date |
71: | * |
72: | * @return string |
73: | */ |
74: | public function getTVShowFirstAirDate() |
75: | { |
76: | return $this->_data['first_air_date']; |
77: | } |
78: | |
79: | /** |
80: | * Get the TVShow's poster |
81: | * |
82: | * @return string |
83: | */ |
84: | public function getPoster() |
85: | { |
86: | return $this->_data['backdrop_path']; |
87: | } |
88: | |
89: | /** |
90: | * Get the name of the job |
91: | * |
92: | * @return string |
93: | */ |
94: | public function getTVShowJob() |
95: | { |
96: | return $this->_data['job']; |
97: | } |
98: | |
99: | /** |
100: | * Get the job department |
101: | * |
102: | * @return string |
103: | */ |
104: | public function getTVShowDepartment() |
105: | { |
106: | return $this->_data['department']; |
107: | } |
108: | |
109: | /** |
110: | * Get the TVShow's overview |
111: | * |
112: | * @return string |
113: | */ |
114: | public function getTVShowOverview() |
115: | { |
116: | return $this->_data['overview']; |
117: | } |
118: | |
119: | /** |
120: | * Get the TVShow's episode count |
121: | * |
122: | * @return string |
123: | */ |
124: | public function getTVShowEpisodeCount() |
125: | { |
126: | return $this->_data['episode_count']; |
127: | } |
128: | |
129: | |
130: | //------------------------------------------------------------------------------ |
131: | // Export |
132: | //------------------------------------------------------------------------------ |
133: | |
134: | /** |
135: | * Get the JSON representation of the TVShow job |
136: | * |
137: | * @return string |
138: | */ |
139: | public function getJSON() |
140: | { |
141: | return json_encode($this->_data, JSON_PRETTY_PRINT); |
142: | } |
143: | } |
144: | ?> |