1.4 KiB
1.4 KiB
title: danog\MadelineProto\TL\Conversion\Extension: Manages generation of extensions for files.
description:
danog\MadelineProto\TL\Conversion\Extension
Author: Daniil Gentili daniil@daniil.it
Manages generation of extensions for files.
Generated by danog/phpdoc.
Method list:
getMimeFromExtension(string $extension, string $default): string
getExtensionFromMime(string $mime): string
getExtensionFromLocation(mixed $location, string $default): string
getMimeFromFile(string $file): string
getMimeFromBuffer(string $buffer): string
Methods:
getMimeFromExtension(string $extension, string $default): string
Get mime type from file extension.
Parameters:
$extension
:string
File extension$default
:string
Default mime type
getExtensionFromMime(string $mime): string
Get extension from mime type.
Parameters:
$mime
:string
MIME type
getExtensionFromLocation(mixed $location, string $default): string
Get extension from file location.
Parameters:
$location
:mixed
File location$default
:string
Default extension
getMimeFromFile(string $file): string
Get mime type of file.
Parameters:
$file
:string
File
getMimeFromBuffer(string $buffer): string
Get mime type from buffer.
Parameters:
$buffer
:string
Buffer