| 1 | <?php |
||
| 10 | class MovieCredit extends Item |
||
| 11 | { |
||
| 12 | protected $crew; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Constructor |
||
| 16 | * @param \vfalies\tmdb\Tmdb $tmdb |
||
| 17 | * @param int $movie_id |
||
| 18 | * @param array $options |
||
| 19 | */ |
||
| 20 | 10 | public function __construct(Tmdb $tmdb, $movie_id, array $options = array()) |
|
| 24 | |||
| 25 | 1 | public function getCrew() |
|
| 36 | |||
| 37 | 9 | public function getCast() |
|
| 48 | |||
| 49 | } |
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: