MediaHandler.php: add installMedia

This commit is contained in:
Zankaria 2025-03-28 23:21:03 +01:00
parent b740e8dc2e
commit 969543ae5f

View file

@ -51,12 +51,25 @@ interface MediaHandler {
*/ */
public function closeHandle(mixed $handle); public function closeHandle(mixed $handle);
/**
* Installs the given file.
*
* @param mixed $handle
* @param string $media_preferred_out_file_basepath
* @return string Path to installed file.
* @throws MediaException On error.
*/
public function installMedia(
mixed $handle,
string $media_preferred_out_file_basepath
): string;
/** /**
* Installs the given file and generates a thumbnail for it. * Installs the given file and generates a thumbnail for it.
* *
* @param mixed $handle * @param mixed $handle
* @param string $media_preferred_out_file_basepath * @param string $media_preferred_out_file_basepath
* @param string $preferred_out_file_basepath * @param string $thumb_preferred_out_file_basepath
* @param int $thumb_max_width * @param int $thumb_max_width
* @param int $thumb_max_height * @param int $thumb_max_height
* @return MediaInstallResult * @return MediaInstallResult
@ -65,7 +78,7 @@ interface MediaHandler {
public function installMediaAndGenerateThumb( public function installMediaAndGenerateThumb(
mixed $handle, mixed $handle,
string $media_preferred_out_file_basepath, string $media_preferred_out_file_basepath,
string $preferred_out_file_basepath, string $thumb_preferred_out_file_basepath,
int $thumb_max_width, int $thumb_max_width,
int $thumb_max_height int $thumb_max_height
): MediaInstallResult; ): MediaInstallResult;