FileExtension uses ConstantsTrait
FileExtension
Enumeration class that defines various file extension supported by the application.
Tags
Table of Contents
Constants
- AAC = '.aac'
- ACCDB = '.accdb'
- AI = '.ai'
- APP = '.app'
- AVI = '.avi'
- BAT = '.bat'
- BMP = '.bmp'
- BZ2 = '.bz2'
- COM = '.com'
- CSS = '.css'
- CSV = '.csv'
- DB = '.db'
- DLL = '.dll'
- DMG = '.dmg'
- DOC = '.doc'
- DOCX = '.docx'
- ENCRYPTED = '.enc'
- EXE = '.exe'
- FLAC = '.flac'
- FLV = '.flv'
- GIF = '.gif'
- GZ = '.gz'
- HTM = '.htm'
- HTML = '.html'
- ICO = '.ico'
- JAR = '.jar'
- JPEG = '.jpeg'
- JPG = '.jpg'
- JS = '.js'
- JSON = '.json'
- M4A = '.m4a'
- M4V = '.m4v'
- MD = '.md'
- MDB = '.mdb'
- MKV = '.mkv'
- MOV = '.mov'
- MP3 = '.mp3'
- MP4 = '.mp4'
- MPEG = '.mpeg'
- MPG = '.mpg'
- ODP = '.odp'
- ODS = '.ods'
- ODT = '.odt'
- OGG = '.ogg'
- OTF = '.otf'
- PDF = '.pdf'
- PHP = '.php'
- PNG = '.png'
- PPT = '.ppt'
- PPTX = '.pptx'
- PSD = '.psd'
- RAR = '.rar'
- RTF = '.rtf'
- SEVEN_Z = '.7z'
- SH = '.sh'
- SQL = '.sql'
- SQLITE = '.sqlite'
- SVG = '.svg'
- TAR = '.tar'
- TAR_BZ2 = '.tar.bz2'
- TAR_GZ = '.tar.gz'
- TAR_GZ_ENCRYPTED = '.tar.gz.enc'
- TGZ = '.tgz'
- TIF = '.tif'
- TIFF = '.tiff'
- TOML = '.toml'
- TTF = '.ttf'
- TXT = '.txt'
- WAV = '.wav'
- WEBM = '.webm'
- WEBP = '.webp'
- WMA = '.wma'
- WMV = '.wmv'
- WOFF = '.woff'
- WOFF2 = '.woff2'
- XLS = '.xls'
- XLSX = '.xlsx'
- XML = '.xml'
- YAML = '.yaml'
- YML = '.yml'
- ZIP = '.zip'
Properties
- $MIME_TYPES : array<string|int, mixed>|null
- $MULTIPLE_EXTENSIONS : array<string|int, mixed>|null
Methods
- getFromMimeType() : array<string|int, mixed>|string|null
- Returns the extension(s) of the specific mime-type value.
- getMimeType() : string|array<string|int, mixed>|null
- Returns the mimetype(s) for a given extension.
- getMultiplePartExtensions() : array<string|int, mixed>
- Returns the list of all multiple part extensions, ex: [ '.tar.gz.enc' , '.tar.gz' , ... ]
- resetCaches() : void
- Reset the internal cache of the static methods.
Constants
AAC
public
mixed
AAC
= '.aac'
ACCDB
public
mixed
ACCDB
= '.accdb'
AI
public
mixed
AI
= '.ai'
APP
public
mixed
APP
= '.app'
AVI
public
mixed
AVI
= '.avi'
BAT
public
mixed
BAT
= '.bat'
BMP
public
mixed
BMP
= '.bmp'
BZ2
public
mixed
BZ2
= '.bz2'
COM
public
mixed
COM
= '.com'
CSS
public
mixed
CSS
= '.css'
CSV
public
mixed
CSV
= '.csv'
DB
public
mixed
DB
= '.db'
DLL
public
mixed
DLL
= '.dll'
DMG
public
mixed
DMG
= '.dmg'
DOC
public
mixed
DOC
= '.doc'
DOCX
public
mixed
DOCX
= '.docx'
ENCRYPTED
public
mixed
ENCRYPTED
= '.enc'
EXE
public
mixed
EXE
= '.exe'
FLAC
public
mixed
FLAC
= '.flac'
FLV
public
mixed
FLV
= '.flv'
GIF
public
mixed
GIF
= '.gif'
GZ
public
mixed
GZ
= '.gz'
HTM
public
mixed
HTM
= '.htm'
HTML
public
mixed
HTML
= '.html'
ICO
public
mixed
ICO
= '.ico'
JAR
public
mixed
JAR
= '.jar'
JPEG
public
mixed
JPEG
= '.jpeg'
JPG
public
mixed
JPG
= '.jpg'
JS
public
mixed
JS
= '.js'
JSON
public
mixed
JSON
= '.json'
M4A
public
mixed
M4A
= '.m4a'
M4V
public
mixed
M4V
= '.m4v'
MD
public
mixed
MD
= '.md'
MDB
public
mixed
MDB
= '.mdb'
MKV
public
mixed
MKV
= '.mkv'
MOV
public
mixed
MOV
= '.mov'
MP3
public
mixed
MP3
= '.mp3'
MP4
public
mixed
MP4
= '.mp4'
MPEG
public
mixed
MPEG
= '.mpeg'
MPG
public
mixed
MPG
= '.mpg'
ODP
public
mixed
ODP
= '.odp'
ODS
public
mixed
ODS
= '.ods'
ODT
public
mixed
ODT
= '.odt'
OGG
public
mixed
OGG
= '.ogg'
OTF
public
mixed
OTF
= '.otf'
public
mixed
PDF
= '.pdf'
PHP
public
mixed
PHP
= '.php'
PNG
public
mixed
PNG
= '.png'
PPT
public
mixed
PPT
= '.ppt'
PPTX
public
mixed
PPTX
= '.pptx'
PSD
public
mixed
PSD
= '.psd'
RAR
public
mixed
RAR
= '.rar'
RTF
public
mixed
RTF
= '.rtf'
SEVEN_Z
public
mixed
SEVEN_Z
= '.7z'
SH
public
mixed
SH
= '.sh'
SQL
public
mixed
SQL
= '.sql'
SQLITE
public
mixed
SQLITE
= '.sqlite'
SVG
public
mixed
SVG
= '.svg'
TAR
public
mixed
TAR
= '.tar'
TAR_BZ2
public
mixed
TAR_BZ2
= '.tar.bz2'
TAR_GZ
public
mixed
TAR_GZ
= '.tar.gz'
TAR_GZ_ENCRYPTED
public
mixed
TAR_GZ_ENCRYPTED
= '.tar.gz.enc'
TGZ
public
mixed
TGZ
= '.tgz'
TIF
public
mixed
TIF
= '.tif'
TIFF
public
mixed
TIFF
= '.tiff'
TOML
public
mixed
TOML
= '.toml'
TTF
public
mixed
TTF
= '.ttf'
TXT
public
mixed
TXT
= '.txt'
WAV
public
mixed
WAV
= '.wav'
WEBM
public
mixed
WEBM
= '.webm'
WEBP
public
mixed
WEBP
= '.webp'
WMA
public
mixed
WMA
= '.wma'
WMV
public
mixed
WMV
= '.wmv'
WOFF
public
mixed
WOFF
= '.woff'
WOFF2
public
mixed
WOFF2
= '.woff2'
XLS
public
mixed
XLS
= '.xls'
XLSX
public
mixed
XLSX
= '.xlsx'
XML
public
mixed
XML
= '.xml'
YAML
public
mixed
YAML
= '.yaml'
YML
public
mixed
YML
= '.yml'
ZIP
public
mixed
ZIP
= '.zip'
Properties
$MIME_TYPES
private
static array<string|int, mixed>|null
$MIME_TYPES
= null
$MULTIPLE_EXTENSIONS
private
static array<string|int, mixed>|null
$MULTIPLE_EXTENSIONS
= null
Methods
getFromMimeType()
Returns the extension(s) of the specific mime-type value.
public
static getFromMimeType(string $mimeType) : array<string|int, mixed>|string|null
Parameters
- $mimeType : string
-
The mime-type to evaluates.
Return values
array<string|int, mixed>|string|nullgetMimeType()
Returns the mimetype(s) for a given extension.
public
static getMimeType(string $extension) : string|array<string|int, mixed>|null
Parameters
- $extension : string
Return values
string|array<string|int, mixed>|nullgetMultiplePartExtensions()
Returns the list of all multiple part extensions, ex: [ '.tar.gz.enc' , '.tar.gz' , ... ]
public
static getMultiplePartExtensions([array<string|int, mixed>|null $customs = [] ]) : array<string|int, mixed>
Parameters
- $customs : array<string|int, mixed>|null = []
-
A list of custom multiple part extensions to append in the final list.
Return values
array<string|int, mixed>resetCaches()
Reset the internal cache of the static methods.
public
static resetCaches() : void