[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch

title

Body

[close]

/vendor/symfony/http-foundation/File/MimeType/ -> ExtensionGuesser.php (summary)

(no description)

File Size: 94 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ExtensionGuesser:: (4 methods):
  getInstance()
  __construct()
  register()
  guess()


Class: ExtensionGuesser  - X-Ref

A singleton mime type to file extension guesser.

A default guesser is provided.
You can register custom guessers by calling the register()
method on the singleton instance:

$guesser = ExtensionGuesser::getInstance();
$guesser->register(new MyCustomExtensionGuesser());

The last registered guesser is preferred over previously registered ones.
getInstance()   X-Ref
Returns the singleton instance.

return: self

__construct()   X-Ref
Registers all natively provided extension guessers.


register(ExtensionGuesserInterface $guesser)   X-Ref
Registers a new extension guesser.

When guessing, this guesser is preferred over previously registered ones.

guess($mimeType)   X-Ref
Tries to guess the extension.

The mime type is passed to each registered mime type guesser in reverse order
of their registration (last registered is queried first). Once a guesser
returns a value that is not NULL, this method terminates and returns the
value.

param: string $mimeType The mime type
return: string The guessed extension or NULL, if none could be guessed



Generated: Tue Apr 7 19:42:26 2020 Cross-referenced by PHPXref 0.7.1