FileExtension uses ConstantsTrait
FileExtension
Enumeration class that defines various file extension supported by the application.
Tags
Table of Contents
Constants
- AAC : string = '.aac'
- ACCDB : string = '.accdb'
- AI : string = '.ai'
- APP : string = '.app'
- AVI : string = '.avi'
- AVIF : string = '.avif'
- BAT : string = '.bat'
- BMP : string = '.bmp'
- BZ2 : string = '.bz2'
- CBOR : string = '.cbor'
- CBOR_SEQ : string = '.cbor.seq'
- COM : string = '.com'
- COSE : string = '.cose'
- COSE_ENCRYPTED : string = '.cose.enc'
- CSS : string = '.css'
- CSV : string = '.csv'
- CUR : string = '.cur'
- DB : string = '.db'
- DLL : string = '.dll'
- DMG : string = '.dmg'
- DOC : string = '.doc'
- DOCX : string = '.docx'
- ENCRYPTED : string = '.enc'
- EXE : string = '.exe'
- FLAC : string = '.flac'
- FLV : string = '.flv'
- GIF : string = '.gif'
- GZ : string = '.gz'
- HEIC : string = '.heic'
- HEIF : string = '.heif'
- HTM : string = '.htm'
- HTML : string = '.html'
- ICO : string = '.ico'
- JAR : string = '.jar'
- JPEG : string = '.jpeg'
- JPG : string = '.jpg'
- JS : string = '.js'
- JSON : string = '.json'
- M4A : string = '.m4a'
- M4V : string = '.m4v'
- MD : string = '.md'
- MDB : string = '.mdb'
- MKV : string = '.mkv'
- MOV : string = '.mov'
- MP3 : string = '.mp3'
- MP4 : string = '.mp4'
- MPEG : string = '.mpeg'
- MPG : string = '.mpg'
- ODP : string = '.odp'
- ODS : string = '.ods'
- ODT : string = '.odt'
- OGG : string = '.ogg'
- OTF : string = '.otf'
- PDF : string = '.pdf'
- PHP : string = '.php'
- PNG : string = '.png'
- PPT : string = '.ppt'
- PPTX : string = '.pptx'
- PSD : string = '.psd'
- RAR : string = '.rar'
- RTF : string = '.rtf'
- SEVEN_Z : string = '.7z'
- SH : string = '.sh'
- SQL : string = '.sql'
- SQLITE : string = '.sqlite'
- SVG : string = '.svg'
- TAR : string = '.tar'
- TAR_BZ2 : string = '.tar.bz2'
- TAR_GZ : string = '.tar.gz'
- TAR_GZ_ENCRYPTED : string = '.tar.gz.enc'
- TGZ : string = '.tgz'
- TIF : string = '.tif'
- TIFF : string = '.tiff'
- TOML : string = '.toml'
- TTF : string = '.ttf'
- TXT : string = '.txt'
- WAV : string = '.wav'
- WEBM : string = '.webm'
- WEBP : string = '.webp'
- WMA : string = '.wma'
- WMV : string = '.wmv'
- WOFF : string = '.woff'
- WOFF2 : string = '.woff2'
- XLS : string = '.xls'
- XLSX : string = '.xlsx'
- XML : string = '.xml'
- YAML : string = '.yaml'
- YML : string = '.yml'
- ZIP : string = '.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
string
AAC
= '.aac'
ACCDB
public
string
ACCDB
= '.accdb'
AI
public
string
AI
= '.ai'
APP
public
string
APP
= '.app'
AVI
public
string
AVI
= '.avi'
AVIF
public
string
AVIF
= '.avif'
BAT
public
string
BAT
= '.bat'
BMP
public
string
BMP
= '.bmp'
BZ2
public
string
BZ2
= '.bz2'
CBOR
public
string
CBOR
= '.cbor'
CBOR_SEQ
public
string
CBOR_SEQ
= '.cbor.seq'
COM
public
string
COM
= '.com'
COSE
public
string
COSE
= '.cose'
COSE_ENCRYPTED
public
string
COSE_ENCRYPTED
= '.cose.enc'
CSS
public
string
CSS
= '.css'
CSV
public
string
CSV
= '.csv'
CUR
public
string
CUR
= '.cur'
DB
public
string
DB
= '.db'
DLL
public
string
DLL
= '.dll'
DMG
public
string
DMG
= '.dmg'
DOC
public
string
DOC
= '.doc'
DOCX
public
string
DOCX
= '.docx'
ENCRYPTED
public
string
ENCRYPTED
= '.enc'
EXE
public
string
EXE
= '.exe'
FLAC
public
string
FLAC
= '.flac'
FLV
public
string
FLV
= '.flv'
GIF
public
string
GIF
= '.gif'
GZ
public
string
GZ
= '.gz'
HEIC
public
string
HEIC
= '.heic'
HEIF
public
string
HEIF
= '.heif'
HTM
public
string
HTM
= '.htm'
HTML
public
string
HTML
= '.html'
ICO
public
string
ICO
= '.ico'
JAR
public
string
JAR
= '.jar'
JPEG
public
string
JPEG
= '.jpeg'
JPG
public
string
JPG
= '.jpg'
JS
public
string
JS
= '.js'
JSON
public
string
JSON
= '.json'
M4A
public
string
M4A
= '.m4a'
M4V
public
string
M4V
= '.m4v'
MD
public
string
MD
= '.md'
MDB
public
string
MDB
= '.mdb'
MKV
public
string
MKV
= '.mkv'
MOV
public
string
MOV
= '.mov'
MP3
public
string
MP3
= '.mp3'
MP4
public
string
MP4
= '.mp4'
MPEG
public
string
MPEG
= '.mpeg'
MPG
public
string
MPG
= '.mpg'
ODP
public
string
ODP
= '.odp'
ODS
public
string
ODS
= '.ods'
ODT
public
string
ODT
= '.odt'
OGG
public
string
OGG
= '.ogg'
OTF
public
string
OTF
= '.otf'
public
string
PDF
= '.pdf'
PHP
public
string
PHP
= '.php'
PNG
public
string
PNG
= '.png'
PPT
public
string
PPT
= '.ppt'
PPTX
public
string
PPTX
= '.pptx'
PSD
public
string
PSD
= '.psd'
RAR
public
string
RAR
= '.rar'
RTF
public
string
RTF
= '.rtf'
SEVEN_Z
public
string
SEVEN_Z
= '.7z'
SH
public
string
SH
= '.sh'
SQL
public
string
SQL
= '.sql'
SQLITE
public
string
SQLITE
= '.sqlite'
SVG
public
string
SVG
= '.svg'
TAR
public
string
TAR
= '.tar'
TAR_BZ2
public
string
TAR_BZ2
= '.tar.bz2'
TAR_GZ
public
string
TAR_GZ
= '.tar.gz'
TAR_GZ_ENCRYPTED
public
string
TAR_GZ_ENCRYPTED
= '.tar.gz.enc'
TGZ
public
string
TGZ
= '.tgz'
TIF
public
string
TIF
= '.tif'
TIFF
public
string
TIFF
= '.tiff'
TOML
public
string
TOML
= '.toml'
TTF
public
string
TTF
= '.ttf'
TXT
public
string
TXT
= '.txt'
WAV
public
string
WAV
= '.wav'
WEBM
public
string
WEBM
= '.webm'
WEBP
public
string
WEBP
= '.webp'
WMA
public
string
WMA
= '.wma'
WMV
public
string
WMV
= '.wmv'
WOFF
public
string
WOFF
= '.woff'
WOFF2
public
string
WOFF2
= '.woff2'
XLS
public
string
XLS
= '.xls'
XLSX
public
string
XLSX
= '.xlsx'
XML
public
string
XML
= '.xml'
YAML
public
string
YAML
= '.yaml'
YML
public
string
YML
= '.yml'
ZIP
public
string
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