function ExtensionMimeTypeGuesser::setMapping

Sets the mimetypes/extension mapping to use when guessing mimetype.

Parameters

array|null $mapping: Passing a NULL mapping will cause guess() to use self::$defaultMapping.

File

core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php, line 926

Class

ExtensionMimeTypeGuesser
Makes possible to guess the MIME type of a file using its extension.

Namespace

Drupal\Core\File\MimeType

Code

public function setMapping(array $mapping = NULL) {
  $this->mapping = $mapping;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.