1 | <?php declare(strict_types = 1); |
||
27 | class Videos extends Results implements VideosResultsInterface |
||
28 | { |
||
29 | /** |
||
30 | * Iso_639_1 |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $iso_639_1 = null; |
||
34 | /** |
||
35 | * Iso_3166_1 |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $iso_3166_1 = null; |
||
39 | /** |
||
40 | * Key |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $key = null; |
||
44 | /** |
||
45 | * Name |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $name = null; |
||
49 | /** |
||
50 | * Site |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $site = null; |
||
54 | /** |
||
55 | * Id |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $id = null; |
||
59 | /** |
||
60 | * Size |
||
61 | * |
||
62 | * @var int |
||
63 | */ |
||
64 | protected $size = null; |
||
65 | /** |
||
66 | * Type |
||
67 | * |
||
68 | * @var string |
||
69 | */ |
||
70 | protected $type = null; |
||
71 | /** |
||
72 | * Constructor |
||
73 | * @param TmdbInterface $tmdb |
||
74 | * @param \stdClass $result |
||
75 | */ |
||
76 | 3 | public function __construct(TmdbInterface $tmdb, \stdClass $result) |
|
89 | |||
90 | /** |
||
91 | * Get iso_639_1 |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getIso_639_1() : string |
||
99 | |||
100 | /** |
||
101 | * Get iso_3166_1 |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getIso_3166_1() : string |
||
109 | |||
110 | /** |
||
111 | * Get key |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getKey() : string |
||
119 | |||
120 | /** |
||
121 | * Get name |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getName() : string |
||
129 | |||
130 | /** |
||
131 | * Get site |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getSite() : string |
||
139 | |||
140 | /** |
||
141 | * Get id |
||
142 | * |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getVideoId() : string |
||
149 | |||
150 | /** |
||
151 | * Get size |
||
152 | * |
||
153 | * @return int |
||
154 | */ |
||
155 | public function getSize() : int |
||
159 | |||
160 | /** |
||
161 | * Get type |
||
162 | * |
||
163 | * @return string |
||
164 | */ |
||
165 | public function getType() : string |
||
169 | |||
170 | /** |
||
171 | * Get id |
||
172 | * |
||
173 | * @return int |
||
174 | */ |
||
175 | public function getId() : ?int |
||
179 | } |
||
180 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: