MimeTypeGuesser::addGuesser

public MimeTypeGuesser::addGuesser(MimeTypeGuesserInterface $guesser, $priority = 0)

Appends a MIME type guesser to the guessers chain.

Parameters

\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface $guesser: The guesser to be appended.

int $priority: The priority of the guesser being added.

Return value

$this

File

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

Class

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

Namespace

Drupal\Core\File\MimeType

Code

public function addGuesser(MimeTypeGuesserInterface $guesser, $priority = 0) {
  $this->guessers[$priority][] = $guesser;
  // Mark sorted guessers for rebuild.
  $this->sortedGuessers = NULL;
  return $this;
}
doc_Drupal
2016-10-29 09:28:26
Comments
Leave a Comment

Please login to continue.