Format
in package
Represent an image format.
Tags
Table of Contents
Constants
- ID_AVIF = 'avif'
- ID_BMP = 'bmp'
- ID_GIF = 'gif'
- ID_HEIC = 'heic'
- ID_JPEG = 'jpeg'
- ID_JXL = 'jxl'
- ID_PNG = 'png'
- ID_WBMP = 'wbmp'
- ID_WEBP = 'webp'
- ID_XBM = 'xbm'
Properties
- $all : FormatList|null
- $alternativeIDs : array<string|int, string>
- $canonicalFileExtension : string
- $id : string
- $mimeType : string
Methods
- get() : static|null
- Get a format given its ID.
- getAll() : array<string|int, static>
- getAlternativeIDs() : array<string|int, string>
- getCanonicalFileExtension() : string
- getID() : string
- getMimeType() : string
- create() : static
- getList() : FormatList
- __construct() : mixed
Constants
ID_AVIF
public
mixed
ID_AVIF
= 'avif'
ID_BMP
public
mixed
ID_BMP
= 'bmp'
ID_GIF
public
mixed
ID_GIF
= 'gif'
ID_HEIC
public
mixed
ID_HEIC
= 'heic'
ID_JPEG
public
mixed
ID_JPEG
= 'jpeg'
ID_JXL
public
mixed
ID_JXL
= 'jxl'
ID_PNG
public
mixed
ID_PNG
= 'png'
ID_WBMP
public
mixed
ID_WBMP
= 'wbmp'
ID_WEBP
public
mixed
ID_WEBP
= 'webp'
ID_XBM
public
mixed
ID_XBM
= 'xbm'
Properties
$all
private
static FormatList|null
$all
= null
$alternativeIDs
private
array<string|int, string>
$alternativeIDs
$canonicalFileExtension
private
string
$canonicalFileExtension
$id
private
string
$id
$mimeType
private
string
$mimeType
Methods
get()
Get a format given its ID.
public
static get(static|string $format) : static|null
Parameters
- $format : static|string
-
the format (a Format instance of a format ID)
Return values
static|nullgetAll()
public
static getAll() : array<string|int, static>
Return values
array<string|int, static>getAlternativeIDs()
public
getAlternativeIDs() : array<string|int, string>
Return values
array<string|int, string>getCanonicalFileExtension()
public
getCanonicalFileExtension() : string
Return values
stringgetID()
public
getID() : string
Return values
stringgetMimeType()
public
getMimeType() : string
Return values
stringcreate()
protected
static create(string $formatID) : static
Parameters
- $formatID : string
Return values
staticgetList()
protected
static getList() : FormatList
Return values
FormatList__construct()
private
__construct(string $id, string $mimeType, mixed $canonicalFileExtension[, array<string|int, string> $alternativeIDs = array() ]) : mixed
Parameters
- $id : string
- $mimeType : string
- $canonicalFileExtension : mixed
- $alternativeIDs : array<string|int, string> = array()