function MimeTypeGuesser::sortGuessers
Same name in other branches
- 8.9.x core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
- 10 core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php \Drupal\Core\File\MimeType\MimeTypeGuesser::sortGuessers()
- 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 143
Class
- MimeTypeGuesser
- Defines a MIME type guesser that also supports stream wrapper paths.
Namespace
Drupal\Core\File\MimeTypeCode
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.