public static function StreamWrapperInterface::getMimeType

Returns the MIME type of the resource.

Parameters

string $uri: The URI, path, or filename.

array $mapping: An optional map of extensions to their mimetypes, in the form:

  • 'mimetypes': a list of mimetypes, keyed by an identifier,
  • 'extensions': the mapping itself, an associative array in which the key is the extension and the value is the mimetype identifier.

Return value

string Returns a string containing the MIME type of the resource.

1 method overrides StreamWrapperInterface::getMimeType()

File

drupal/core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php, line 78
Definition of Drupal\Core\StreamWrapper\StreamWrapperInterface.

Class

StreamWrapperInterface
Defines a Drupal stream wrapper extension.

Namespace

Drupal\Core\StreamWrapper

Code

public static function getMimeType($uri, $mapping = NULL);