interface MediaTypeGuesserInterface in Gutenberg 8.2
Same name and namespace in other branches
- 8 src/MediaTypeGuesserInterface.php \Drupal\gutenberg\MediaTypeGuesserInterface
Guesses media type of the file.
@package Drupal\gutenberg
Hierarchy
- interface \Drupal\gutenberg\MediaTypeGuesserInterface
Expanded class hierarchy of MediaTypeGuesserInterface
All classes that implement MediaTypeGuesserInterface
1 file declares its use of MediaTypeGuesserInterface
- MediaService.php in src/
Service/ MediaService.php
File
- src/
MediaTypeGuesserInterface.php, line 10
Namespace
Drupal\gutenbergView source
interface MediaTypeGuesserInterface {
/**
* Flag for ::guess method, returns all guessed media types.
*/
const RETURN_ALL = 0;
/**
* Flag for ::guess method, returns only one negotiated media type.
*/
const RETURN_NEGOTIATED = 1;
/**
* Guesses all media types based on general mime type.
*
* @param \Drupal\gutenberg\string $general_mime_type
* General mime type (image, video, audio, ...).
* @param int $return_option
* If self::RETURN_ALL - return all guessed media types.
* If self::RETURN_NEGOTIATED - returns only one negotiated media type.
*
* @return string|array
* The guessed media types.
*/
public function guess(string $general_mime_type, $return_option = self::RETURN_ALL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaTypeGuesserInterface:: |
public | function | Guesses all media types based on general mime type. | 1 |
MediaTypeGuesserInterface:: |
constant | Flag for ::guess method, returns all guessed media types. | ||
MediaTypeGuesserInterface:: |
constant | Flag for ::guess method, returns only one negotiated media type. |