MimeTypeGuesser::sortGuessers

protected MimeTypeGuesser::sortGuessers()

Sorts guessers according to priority.

Return value

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

File

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

Class

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

Namespace

Drupal\Core\File\MimeType

Code

protected function sortGuessers() {
  $sorted = array();
  krsort($this->guessers);

  foreach ($this->guessers as $guesser) {
    $sorted = array_merge($sorted, $guesser);
  }
  return $sorted;
}
doc_Drupal
2016-10-29 09:28:26
Comments
Leave a Comment

Please login to continue.