function public function SerializedResponse::validMimeExtension

8.x-3.x SerializedResponse.php public SerializedResponse::validMimeExtension()

Ensures the MIME type matches the request file extension.

Return value

bool TRUE or FALSE

Class

SerializedResponse
Class SerializedResponse.

Namespace

Drupal\bootstrap

Source src/SerializedResponse.php (line 220)

public function validMimeExtension() {
  $extension = $this->getExtension();
  $mimeType = $this->getMimeType();
  return isset(static::$mimeExtensionMap[$extension]) && in_array($mimeType, static::$mimeExtensionMap[$extension]);
}