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 |
|
58 | |||
59 | public static function removePoster(int $movieId): void |
||
71 | |||
72 | /** |
||
73 | * @param int $movieId |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | 1 | public static function getUrl(int $movieId): string |
|
81 | |||
82 | /** |
||
83 | * @param int $movieId |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | 1 | public static function getPath(int $movieId): string |
|
91 | |||
92 | public static function getPredefinedSizes(): array |
||
99 | } |
||
100 |