1 | <?php |
||
14 | class Movie extends AbstractModel |
||
15 | { |
||
16 | /** |
||
17 | * All known IMDb hostnames indexed by their language |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | public static $imdbHostnames = [ |
||
22 | 'en' => 'www.imdb.com', |
||
23 | 'fr' => 'www.imdb.fr', |
||
24 | 'de' => 'www.imdb.de', |
||
25 | 'es' => 'www.imdb.es', |
||
26 | 'it' => 'www.imdb.it', |
||
27 | 'pt' => 'www.imdb.pt', |
||
28 | 'akas' => 'akas.imdb.com', |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * Extract IMDb id from URL |
||
33 | * |
||
34 | * @param string $string |
||
35 | * |
||
36 | * @return null|string the id extracted |
||
37 | */ |
||
38 | 2 | public static function extractId($string) |
|
47 | |||
48 | /** |
||
49 | * Returns the title, if needed fetch the title from IMDb |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function getTitle() |
|
62 | |||
63 | /** |
||
64 | * Fetch data from IMDb and store in database (possibly overwriting) |
||
65 | */ |
||
66 | public function fetchData(): void |
||
104 | |||
105 | /** |
||
106 | * Sets the ID for the movie from any string containing a valid ID |
||
107 | * |
||
108 | * @param string $id |
||
109 | * |
||
110 | * @return \mQueue\Model\Movie |
||
111 | */ |
||
112 | public function setId($id) |
||
123 | |||
124 | /** |
||
125 | * Returns the IMDb url for the movie |
||
126 | * |
||
127 | * @param string $lang suggested language for hostname |
||
128 | * |
||
129 | * @return string |
||
130 | */ |
||
131 | public function getImdbUrl($lang = null) |
||
145 | |||
146 | /** |
||
147 | * Returns the status for this movie and the specified user |
||
148 | * |
||
149 | * @param \mQueue\Model\User $user |
||
150 | * |
||
151 | * @return \mQueue\Model\Status |
||
152 | */ |
||
153 | public function getStatus(User $user = null) |
||
157 | |||
158 | /** |
||
159 | * Set the status for the specified user |
||
160 | * |
||
161 | * @param \mQueue\Model\User $user |
||
162 | * @param int $rating @see \mQueue\Model\Status |
||
163 | * |
||
164 | * @return \mQueue\Model\Status |
||
165 | */ |
||
166 | public function setStatus(User $user, $rating) |
||
172 | |||
173 | /** |
||
174 | * Set the source for the movie if any. In any case record the search date and count |
||
175 | * |
||
176 | * @param array|false $source |
||
177 | */ |
||
178 | public function setSource($source): void |
||
189 | } |
||
190 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.