Link Search Menu Expand Document

danog\MadelineProto\TL\Conversion\Extension

Back to index

Author: Daniil Gentili daniil@daniil.it

Manages generation of extensions for files.

Constants

  • danog\MadelineProto\TL\Conversion\Extension::ALL_MIMES:

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

Generated by danog/phpdoc