Index Documentation

MediaType
in package
implements Stringable, IComparable, IEquatable

Table of Contents

Interfaces

Stringable
IComparable
Provides an interface for comparison between objects. Allows for order/sorting instances.
IEquatable
Provides an interface for determining the value-equality of two objects.

Methods

__construct()  : mixed
__toString()  : string
compare()  : int
Compares the current instance with another and returns an integer that indicates whether the current object comes before or after or the same position and the other object.
compareCategory()  : int
compareKind()  : int
compareSuffix()  : int
equals()  : bool
Checks whether the current object is equal to another.
fromPath()  : MediaType
getCategory()  : string
getCharset()  : string
getKind()  : string
getParam()  : mixed
getParams()  : array<string|int, mixed>
getQuality()  : float
getSuffix()  : string
hasParam()  : bool
matchCategory()  : bool
matchKind()  : bool
matchSuffix()  : bool
parse()  : MediaType

Methods

__construct()

public __construct(string $category, string $kind, string $suffix, array<string|int, mixed> $params) : mixed
Parameters
$category : string
$kind : string
$suffix : string
$params : array<string|int, mixed>

__toString()

public __toString() : string
Return values
string

compare()

Compares the current instance with another and returns an integer that indicates whether the current object comes before or after or the same position and the other object.

public compare(mixed $other) : int
Parameters
$other : mixed
Return values
int

A value that indicates the relative order of the objects being compared. Less than zero for before, zero for same position, greater than zero for after.

compareCategory()

public compareCategory(string $category) : int
Parameters
$category : string
Return values
int

compareKind()

public compareKind(string $kind) : int
Parameters
$kind : string
Return values
int

compareSuffix()

public compareSuffix(string $suffix) : int
Parameters
$suffix : string
Return values
int

equals()

Checks whether the current object is equal to another.

public equals(mixed $other) : bool
Parameters
$other : mixed
Return values
bool

true if the objects are equals, false if not.

getCategory()

public getCategory() : string
Return values
string

getCharset()

public getCharset() : string
Return values
string

getKind()

public getKind() : string
Return values
string

getParam()

public getParam(string $name[, int $filter = FILTER_DEFAULT ][, mixed $options = null ]) : mixed
Parameters
$name : string
$filter : int = FILTER_DEFAULT
$options : mixed = null

getParams()

public getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getQuality()

public getQuality() : float
Return values
float

getSuffix()

public getSuffix() : string
Return values
string

hasParam()

public hasParam(string $name) : bool
Parameters
$name : string
Return values
bool

matchCategory()

public matchCategory(string $category) : bool
Parameters
$category : string
Return values
bool

matchKind()

public matchKind(string $kind) : bool
Parameters
$kind : string
Return values
bool

matchSuffix()

public matchSuffix(string $suffix) : bool
Parameters
$suffix : string
Return values
bool

        
On this page

Search results