You are here

public function MimeTypeExtensionGuesser::guess in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser::guess()

Makes a best guess for a file extension, given a mime type.

Parameters

string $mimeType The mime type:

Return value

string The guessed extension or NULL, if none could be guessed

Overrides ExtensionGuesserInterface::guess

File

vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php, line 803

Class

MimeTypeExtensionGuesser
Provides a best-guess mapping of mime type to file extension.

Namespace

Symfony\Component\HttpFoundation\File\MimeType

Code

public function guess($mimeType) {
  return isset($this->defaultExtensions[$mimeType]) ? $this->defaultExtensions[$mimeType] : null;
}