forked from leftypol/leftypol
ThumbGenerator.php: add thumb generation service interface
This commit is contained in:
parent
1485ef3f2d
commit
6d19717d28
1 changed files with 20 additions and 0 deletions
20
inc/Service/Media/ThumbGenerator.php
Normal file
20
inc/Service/Media/ThumbGenerator.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
namespace Vichan\Service\Media;
|
||||||
|
|
||||||
|
use Vichan\Data\ThumbGenerationResult;
|
||||||
|
|
||||||
|
|
||||||
|
interface ThumbGenerator {
|
||||||
|
public function supportsMime(string $mime): bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a thumbnail from the given file.
|
||||||
|
*
|
||||||
|
* @param string $source_file_path
|
||||||
|
* @param string $preferred_out_file_path
|
||||||
|
* @param int $max_width
|
||||||
|
* @param int $max_height
|
||||||
|
* @return ThumbGenerationResult
|
||||||
|
*/
|
||||||
|
public function generateThumb(string $source_file_path, string $preferred_out_file_path, int $max_width, int $max_height): ThumbGenerationResult;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue