| 1 | <?php |
||
| 8 | class Collection extends Item implements CollectionInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | // Private loaded data |
||
| 12 | protected $data = null; |
||
| 13 | protected $conf = null; |
||
| 14 | protected $id = null; |
||
| 15 | protected $tmdb = null; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor |
||
| 19 | * @param Tmdb $tmdb |
||
| 20 | * @param int $collection_id |
||
| 21 | * @param array $options |
||
| 22 | */ |
||
| 23 | 15 | public function __construct(Tmdb $tmdb, int $collection_id, array $options = array()) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Get collection ID |
||
| 30 | * @return int |
||
| 31 | * @throws \Exception |
||
| 32 | */ |
||
| 33 | 2 | public function getId(): int |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Get collection name |
||
| 40 | * @return string |
||
| 41 | * @throws \Exception |
||
| 42 | */ |
||
| 43 | 2 | public function getName(): string |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Get collection parts |
||
| 54 | * @return Generator |
||
| 55 | */ |
||
| 56 | 2 | public function getParts(): \Generator |
|
| 67 | |||
| 68 | } |
||
| 69 |