FileMimeType uses ConstantsTrait
FileExtension
Enumeration class that defines various file mime-types supported by the application.
Tags
Table of Contents
Constants
- AAC = 'audio/aac'
- ACCDB = 'application/msaccess'
- AI = ['application/postscript', 'application/illustrator']
- APP = 'application/octet-stream'
- AVI = 'video/x-msvideo'
- BAT = 'application/x-bat'
- BMP = 'image/bmp'
- COM = 'application/x-msdownload'
- CSS = 'text/css'
- CSV = 'text/csv'
- DB = 'application/octet-stream'
- DLL = 'application/x-msdownload'
- DMG = 'application/x-apple-diskimage'
- DOC = 'application/msword'
- DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
- ENCRYPTED = 'application/octet-stream'
- EXE = ['application/x-msdownload', 'application/vnd.microsoft.portable-executable']
- FLAC = 'audio/flac'
- FLV = 'video/x-flv'
- GIF = 'image/gif'
- GZ = 'application/gzip'
- HTM = 'text/html'
- HTML = 'text/html'
- ICO = 'image/vnd.microsoft.icon'
- JAR = 'application/java-archive'
- JPEG = 'image/jpeg'
- JPG = 'image/jpeg'
- JS = ['application/javascript', 'text/javascript']
- JSON = 'application/json'
- M4A = ['audio/mp4', 'audio/x-m4a']
- M4V = ['video/x-m4', 'video/mp4v']
- MD = 'text/markdown'
- MDB = 'application/x-msaccess'
- MKV = 'video/x-matroska'
- MOV = 'video/quicktime'
- MP3 = 'audio/mpeg'
- MP4 = 'video/mp4'
- MPEG = 'video/mpeg'
- MPG = 'video/mpeg'
- ODP = 'application/vnd.oasis.opendocument.presentation'
- ODS = 'application/vnd.oasis.opendocument.spreadsheet'
- ODT = 'application/vnd.oasis.opendocument.text'
- OGG = 'audio/ogg'
- OTF = 'font/otf'
- PDF = 'application/pdf'
- PHP = ['application/x-php', 'application/x-httpd-php', 'application/x-httpd-php-source', 'text/php', 'text/x-php', 'application/php']
- PNG = 'image/png'
- PPT = 'application/vnd.ms-powerpoint'
- PPTX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
- PSD = 'image/vnd.adobe.photoshop'
- RAR = 'application/vnd.rar'
- RTF = 'application/rtf'
- SEVEN_Z = 'application/x-7z-compressed'
- SH = 'application/x-sh'
- SQL = 'application/sql'
- SQLITE = 'application/vnd.sqlite3'
- SVG = 'image/svg+xml'
- TAR = ['application/tar', 'application/x-tar']
- TAR_BZ2 = 'application/x-bzip2'
- TAR_GZ = 'application/gzip'
- TAR_GZ_ENCRYPTED = 'application/octet-stream'
- TGZ = 'application/gzip'
- TIF = 'image/tiff'
- TIFF = 'image/tiff'
- TOML = 'application/toml'
- TTF = 'font/ttf'
- TXT = 'text/plain'
- WAV = 'audio/wav'
- WEBM = 'video/webm'
- WEBP = 'image/webp'
- WMA = 'audio/x-ms-wma'
- WMV = 'video/x-ms-wmv'
- WOFF = 'font/woff'
- WOFF2 = 'font/woff2'
- XLS = 'application/vnd.ms-excel'
- XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
- XML = 'application/xml'
- YAML = ['application/x-yaml', 'text/yaml']
- YML = 'application/x-yaml'
- ZIP = 'application/zip'
Properties
- $EXTENSIONS : array<string|int, mixed>|null
Methods
- getExtension() : string|array<string|int, mixed>|null
- Returns the mimetype(s) for a given code.
- getFromExtension() : array<string|int, mixed>|string|null
- Returns the extension(s) of the specific mime-type value.
- resetCaches() : void
- Reset the internal cache of the static methods.
Constants
AAC
public
mixed
AAC
= 'audio/aac'
ACCDB
public
mixed
ACCDB
= 'application/msaccess'
AI
public
mixed
AI
= ['application/postscript', 'application/illustrator']
APP
public
mixed
APP
= 'application/octet-stream'
AVI
public
mixed
AVI
= 'video/x-msvideo'
BAT
public
mixed
BAT
= 'application/x-bat'
BMP
public
mixed
BMP
= 'image/bmp'
COM
public
mixed
COM
= 'application/x-msdownload'
CSS
public
mixed
CSS
= 'text/css'
CSV
public
mixed
CSV
= 'text/csv'
DB
public
mixed
DB
= 'application/octet-stream'
DLL
public
mixed
DLL
= 'application/x-msdownload'
DMG
public
mixed
DMG
= 'application/x-apple-diskimage'
DOC
public
mixed
DOC
= 'application/msword'
DOCX
public
mixed
DOCX
= 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
ENCRYPTED
public
mixed
ENCRYPTED
= 'application/octet-stream'
EXE
public
mixed
EXE
= ['application/x-msdownload', 'application/vnd.microsoft.portable-executable']
FLAC
public
mixed
FLAC
= 'audio/flac'
FLV
public
mixed
FLV
= 'video/x-flv'
GIF
public
mixed
GIF
= 'image/gif'
GZ
public
mixed
GZ
= 'application/gzip'
HTM
public
mixed
HTM
= 'text/html'
HTML
public
mixed
HTML
= 'text/html'
ICO
public
mixed
ICO
= 'image/vnd.microsoft.icon'
JAR
public
mixed
JAR
= 'application/java-archive'
JPEG
public
mixed
JPEG
= 'image/jpeg'
JPG
public
mixed
JPG
= 'image/jpeg'
JS
public
mixed
JS
= ['application/javascript', 'text/javascript']
JSON
public
mixed
JSON
= 'application/json'
M4A
public
mixed
M4A
= ['audio/mp4', 'audio/x-m4a']
M4V
public
mixed
M4V
= ['video/x-m4', 'video/mp4v']
MD
public
mixed
MD
= 'text/markdown'
MDB
public
mixed
MDB
= 'application/x-msaccess'
MKV
public
mixed
MKV
= 'video/x-matroska'
MOV
public
mixed
MOV
= 'video/quicktime'
MP3
public
mixed
MP3
= 'audio/mpeg'
MP4
public
mixed
MP4
= 'video/mp4'
MPEG
public
mixed
MPEG
= 'video/mpeg'
MPG
public
mixed
MPG
= 'video/mpeg'
ODP
public
mixed
ODP
= 'application/vnd.oasis.opendocument.presentation'
ODS
public
mixed
ODS
= 'application/vnd.oasis.opendocument.spreadsheet'
ODT
public
mixed
ODT
= 'application/vnd.oasis.opendocument.text'
OGG
public
mixed
OGG
= 'audio/ogg'
OTF
public
mixed
OTF
= 'font/otf'
public
mixed
PDF
= 'application/pdf'
PHP
public
mixed
PHP
= ['application/x-php', 'application/x-httpd-php', 'application/x-httpd-php-source', 'text/php', 'text/x-php', 'application/php']
PNG
public
mixed
PNG
= 'image/png'
PPT
public
mixed
PPT
= 'application/vnd.ms-powerpoint'
PPTX
public
mixed
PPTX
= 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
PSD
public
mixed
PSD
= 'image/vnd.adobe.photoshop'
RAR
public
mixed
RAR
= 'application/vnd.rar'
RTF
public
mixed
RTF
= 'application/rtf'
SEVEN_Z
public
mixed
SEVEN_Z
= 'application/x-7z-compressed'
SH
public
mixed
SH
= 'application/x-sh'
SQL
public
mixed
SQL
= 'application/sql'
SQLITE
public
mixed
SQLITE
= 'application/vnd.sqlite3'
SVG
public
mixed
SVG
= 'image/svg+xml'
TAR
public
mixed
TAR
= ['application/tar', 'application/x-tar']
TAR_BZ2
public
mixed
TAR_BZ2
= 'application/x-bzip2'
TAR_GZ
public
mixed
TAR_GZ
= 'application/gzip'
TAR_GZ_ENCRYPTED
public
mixed
TAR_GZ_ENCRYPTED
= 'application/octet-stream'
TGZ
public
mixed
TGZ
= 'application/gzip'
TIF
public
mixed
TIF
= 'image/tiff'
TIFF
public
mixed
TIFF
= 'image/tiff'
TOML
public
mixed
TOML
= 'application/toml'
TTF
public
mixed
TTF
= 'font/ttf'
TXT
public
mixed
TXT
= 'text/plain'
WAV
public
mixed
WAV
= 'audio/wav'
WEBM
public
mixed
WEBM
= 'video/webm'
WEBP
public
mixed
WEBP
= 'image/webp'
WMA
public
mixed
WMA
= 'audio/x-ms-wma'
WMV
public
mixed
WMV
= 'video/x-ms-wmv'
WOFF
public
mixed
WOFF
= 'font/woff'
WOFF2
public
mixed
WOFF2
= 'font/woff2'
XLS
public
mixed
XLS
= 'application/vnd.ms-excel'
XLSX
public
mixed
XLSX
= 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
XML
public
mixed
XML
= 'application/xml'
YAML
public
mixed
YAML
= ['application/x-yaml', 'text/yaml']
YML
public
mixed
YML
= 'application/x-yaml'
ZIP
public
mixed
ZIP
= 'application/zip'
Properties
$EXTENSIONS
private
static array<string|int, mixed>|null
$EXTENSIONS
= null
Methods
getExtension()
Returns the mimetype(s) for a given code.
public
static getExtension(string $mimeType) : string|array<string|int, mixed>|null
Parameters
- $mimeType : string
-
The mime type to evaluates.
Return values
string|array<string|int, mixed>|nullgetFromExtension()
Returns the extension(s) of the specific mime-type value.
public
static getFromExtension(string $extension) : array<string|int, mixed>|string|null
Parameters
- $extension : string
-
The extension to evaluates.
Return values
array<string|int, mixed>|string|nullresetCaches()
Reset the internal cache of the static methods.
public
static resetCaches() : void