public function Request::getMimeType

Gets the mime type associated with the format.

@api

Parameters

string $format The format:

Return value

string The associated mime type (null if not found)

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 944

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function getMimeType($format) {
  if (null === static::$formats) {
    static::initializeFormats();
  }
  return isset(static::$formats[$format]) ? static::$formats[$format][0] : null;
}