neoncitylights/php-media-type

MediaTypeParser

FinalYes
Tags
see
https://mimesniff.spec.whatwg.org/#parsing-a-mime-type

Table of Contents

Methods

parse()  : MediaType
parseOrNull()  : MediaType|null
parseOrThrow()  : MediaType
collectParameters()  : array<string|int, mixed>
collectSubType()  : string
collectType()  : string

Methods

collectParameters()

private collectParameters(string $s, int $length, int &$position) : array<string|int, mixed>
Parameters
$s : string
$length : int
$position : int
Tags
throws
InvariantException
Return values
array<string|int, mixed>

collectType()

private collectType(string $s, int $length, int &$position) : string
Parameters
$s : string
$length : int
$position : int
Tags
throws
MediaTypeParserException
Return values
string

        
On this page

Search results