forked from leftypol/leftypol
MediaHandler.php: add file kind
This commit is contained in:
parent
3eca4bccc0
commit
9c09d495d8
1 changed files with 19 additions and 1 deletions
|
@ -5,9 +5,27 @@ use Vichan\Data\ThumbGenerationResult;
|
||||||
|
|
||||||
|
|
||||||
interface MediaHandler {
|
interface MediaHandler {
|
||||||
|
/**
|
||||||
|
* PHP file upload,
|
||||||
|
*/
|
||||||
|
public const FILE_KIND_UPLOADED = 0;
|
||||||
|
/**
|
||||||
|
* Temporary file that should be moved/copied elsewhere.
|
||||||
|
*/
|
||||||
|
public const FILE_KIND_TEMPORARY = 1;
|
||||||
|
/**
|
||||||
|
* Static vichan file.
|
||||||
|
*/
|
||||||
|
public const FILE_KIND_STATIC = 2;
|
||||||
|
/**
|
||||||
|
* Live file in use by vichan in some post.
|
||||||
|
*/
|
||||||
|
public const FILE_KIND_INSTALLED = 3;
|
||||||
|
|
||||||
|
|
||||||
public function supportsMime(string $mime): bool;
|
public function supportsMime(string $mime): bool;
|
||||||
|
|
||||||
public function openHandle(string $file_path, string $file_mime): mixed;
|
public function openHandle(string $file_path, string $file_mime, int $file_kind): mixed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a thumbnail from the given file.
|
* Generates a thumbnail from the given file.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue