1 | <?php |
||
5 | class Poster |
||
6 | { |
||
7 | const TMDB_BASE_URL = 'https://image.tmdb.org/t/p/original'; |
||
8 | const BASE_URL = '/f/movies/{movieId}/poster.jpg'; |
||
9 | const BASE_PATH = __DIR__.'/../../../public/f/movies/{movieId}/poster.jpg'; |
||
10 | |||
11 | /** |
||
12 | * @param int $movieId |
||
13 | * @param string $posterUrl |
||
14 | * |
||
15 | * @return null|string |
||
16 | */ |
||
17 | 1 | public static function savePoster(int $movieId, string $posterUrl): ?string |
|
54 | |||
55 | public static function removePoster(int $movieId): void |
||
67 | |||
68 | /** |
||
69 | * @param int $movieId |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | 1 | public static function getUrl(int $movieId): string |
|
77 | |||
78 | /** |
||
79 | * @param int $movieId |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | 1 | public static function getPath(int $movieId): string |
|
87 | } |
||
88 |