1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the Tmdb package. |
5
|
|
|
* |
6
|
|
|
* (c) Vincent Faliès <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
* |
11
|
|
|
* @author Vincent Faliès <[email protected]> |
12
|
|
|
* @copyright Copyright (c) 2017 |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace VfacTmdb\Results; |
16
|
|
|
|
17
|
|
|
use VfacTmdb\Abstracts\Results; |
18
|
|
|
use VfacTmdb\Interfaces\TmdbInterface; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Class to manipulate a people movie crew result |
22
|
|
|
* @package Tmdb |
23
|
|
|
* @author Vincent Faliès <[email protected]> |
24
|
|
|
* @copyright Copyright (c) 2017 |
25
|
|
|
*/ |
26
|
|
|
class PeopleMovieCrew extends Results |
27
|
|
|
{ |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* Adult |
31
|
|
|
* @var bool |
32
|
|
|
*/ |
33
|
|
|
protected $adult = false; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Credit Id |
37
|
|
|
* @var string |
38
|
|
|
*/ |
39
|
|
|
protected $credit_id = null; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* title |
43
|
|
|
* @var string |
44
|
|
|
*/ |
45
|
|
|
protected $title = null; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Image poster path |
49
|
|
|
* @var string |
50
|
|
|
*/ |
51
|
|
|
protected $poster_path = null; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* original title |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
protected $original_title = null; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Release date |
61
|
|
|
* @var string |
62
|
|
|
*/ |
63
|
|
|
protected $release_date = null; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Id |
67
|
|
|
* @var int |
68
|
|
|
*/ |
69
|
|
|
protected $id = null; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Department |
73
|
|
|
* @var string |
74
|
|
|
*/ |
75
|
|
|
protected $department = null; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Job |
79
|
|
|
* @var string |
80
|
|
|
*/ |
81
|
|
|
protected $job = null; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* Constructor |
85
|
|
|
* @param TmdbInterface $tmdb |
86
|
|
|
* @param \stdClass $result |
87
|
|
|
*/ |
88
|
30 |
|
public function __construct(TmdbInterface $tmdb, \stdClass $result) |
89
|
|
|
{ |
90
|
30 |
|
parent::__construct($tmdb, $result); |
91
|
|
|
|
92
|
30 |
|
$this->id = $this->data->id; |
93
|
30 |
|
$this->adult = $this->data->adult; |
94
|
30 |
|
$this->department = $this->data->department; |
95
|
30 |
|
$this->job = $this->data->job; |
96
|
30 |
|
$this->credit_id = $this->data->credit_id; |
97
|
30 |
|
$this->original_title = $this->data->original_title; |
98
|
30 |
|
$this->title = $this->data->title; |
99
|
30 |
|
$this->poster_path = $this->data->poster_path; |
100
|
30 |
|
$this->release_date = $this->data->release_date; |
101
|
30 |
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* Get Id |
105
|
|
|
* @return int |
106
|
|
|
*/ |
107
|
3 |
|
public function getId() : int |
108
|
|
|
{ |
109
|
3 |
|
return (int) $this->id; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* Get credit Id |
114
|
|
|
* @return string |
115
|
|
|
*/ |
116
|
3 |
|
public function getCreditId() : string |
117
|
|
|
{ |
118
|
3 |
|
return $this->credit_id; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
/** |
122
|
|
|
* Get department name |
123
|
|
|
* @return string |
124
|
|
|
*/ |
125
|
3 |
|
public function getDepartment() : string |
126
|
|
|
{ |
127
|
3 |
|
return $this->department; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Get job |
132
|
|
|
* @return string |
133
|
|
|
*/ |
134
|
3 |
|
public function getJob() : string |
135
|
|
|
{ |
136
|
3 |
|
return $this->job; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* Get title |
141
|
|
|
* @return string |
142
|
|
|
*/ |
143
|
3 |
|
public function getTitle() : string |
144
|
|
|
{ |
145
|
3 |
|
return $this->title; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* Get original title |
150
|
|
|
* @return string |
151
|
|
|
*/ |
152
|
3 |
|
public function getOriginalTitle() : string |
153
|
|
|
{ |
154
|
3 |
|
return $this->original_title; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Get poster path |
159
|
|
|
* @return string |
160
|
|
|
*/ |
161
|
3 |
|
public function getPosterPath() : string |
162
|
|
|
{ |
163
|
3 |
|
return $this->poster_path; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* Get release date |
168
|
|
|
* @return string |
169
|
|
|
*/ |
170
|
3 |
|
public function getReleaseDate() : string |
171
|
|
|
{ |
172
|
3 |
|
return $this->release_date; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* Adult |
177
|
|
|
* @return bool |
178
|
|
|
*/ |
179
|
3 |
|
public function getAdult() : bool |
180
|
|
|
{ |
181
|
3 |
|
return $this->adult; |
182
|
|
|
} |
183
|
|
|
} |
184
|
|
|
|