You are here

public static function DrupalStreamWrapperInterface::getMimeType in AmazonS3 7.2

Returns the MIME type of the resource.

Parameters

$uri: The URI, path, or filename.

$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

Returns a string containing the MIME type of the resource.

File

tests/include/DrupalStreamWrapperInterface.inc, line 88
Copy in Drupal's stream wrapper interfaces so we don't rely on finding a Drupal installation to run PHPUnit tests.

Class

DrupalStreamWrapperInterface
Drupal stream wrapper extension.

Code

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