You are here

public static function MimeTypeGuesser::getInstance in Zircon Profile 8

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

Returns the singleton instance.

Return value

MimeTypeGuesser

4 calls to MimeTypeGuesser::getInstance()
File::getMimeType in vendor/symfony/http-foundation/File/File.php
Returns the mime type of the file.
MimeTypeGuesser::registerWithSymfonyGuesser in core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
A helper function to register with Symfony's singleton mime type guesser.
MimeTypeGuesserTest::testSymfonyGuesserRegistration in core/tests/Drupal/Tests/Core/File/MimeTypeGuesserTest.php
@covers ::registerWithSymfonyGuesser
MimeTypeTest::testGuessImageWithFileBinaryMimeTypeGuesser in vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php

File

vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php, line 61

Class

MimeTypeGuesser
A singleton mime type guesser.

Namespace

Symfony\Component\HttpFoundation\File\MimeType

Code

public static function getInstance() {
  if (null === self::$instance) {
    self::$instance = new self();
  }
  return self::$instance;
}