MimeMap

ExtensionInterface

Interface for Extension objects.

Table of Contents

Methods

__construct()  : mixed
Constructor.
getDefaultType()  : string
Returns the file extension's preferred MIME type.
getTypes()  : array<int, string>
Returns all the MIME types related to the file extension.

Methods

__construct()

Constructor.

public __construct(string $extension[, MimeMapInterface>|null $mapClass = null ]) : mixed
APIYes
Parameters
$extension : string

A file extension.

$mapClass : MimeMapInterface>|null = null

(Optional) The FQCN of the map class to use.

getDefaultType()

Returns the file extension's preferred MIME type.

public getDefaultType() : string
APIYes
Tags
throws
MappingException

if no mapping found.

Return values
string

getTypes()

Returns all the MIME types related to the file extension.

public getTypes() : array<int, string>
APIYes
Tags
throws
MappingException

if no mapping found.

Return values
array<int, string>

        
On this page

Search results