function MimeTypeGuesser::sortGuessers

Same name in other branches
  1. 9 core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
  2. 8.9.x core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
  3. 11.x core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()

Sorts guessers according to priority.

Return value

\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface[] A sorted array of MIME type guesser objects.

1 call to MimeTypeGuesser::sortGuessers()
MimeTypeGuesser::guessMimeType in core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php

File

core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php, line 111

Class

MimeTypeGuesser
Defines a MIME type guesser that also supports stream wrapper paths.

Namespace

Drupal\Core\File\MimeType

Code

protected function sortGuessers() {
    krsort($this->guessers);
    return array_merge(...$this->guessers);
}

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