MediaWiki master
MediaWiki\Search\Entity\SearchResultThumbnail Class Reference

Class that stores information about thumbnail, e. More...

Public Member Functions

 __construct (string $mimeType, $size, ?int $width, ?int $height, ?int $duration, string $url, ?string $name)
 
 getDuration ()
 Duration of the representation in seconds or null if not applicable.
 
 getHeight ()
 Height of the representation in pixels or null if not applicable.
 
 getMimeType ()
 Internet mime type for the representation, like "image/png" or "audio/mp3".
 
 getName ()
 String that represent file identity in storage or null.
 
 getSize ()
 
 getUrl ()
 Full URL to the contents of the file.
 
 getWidth ()
 Width of the representation in pixels or null if not applicable.
 

Detailed Description

Class that stores information about thumbnail, e.

g. url, width and height

Stability: newable

Definition at line 9 of file SearchResultThumbnail.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Search\Entity\SearchResultThumbnail::__construct ( string $mimeType,
$size,
?int $width,
?int $height,
?int $duration,
string $url,
?string $name )
Parameters
string$mimeTypeInternet mime type for the representation, like "image/png" or "audio/mp3"
int | callable | null$sizeSize of the representation in bytes. This parameter has been deprecated in 1.41 and will be removed.
int | null$widthWidth of the representation in pixels or null if not applicable
int | null$heightHeight of the representation in pixels or null if not applicable
int | null$durationDuration of the representation in seconds or null if not applicable
string$urlfull URL to the contents of the file
string | null$namefull URL to the contents of the file

Definition at line 64 of file SearchResultThumbnail.php.

References $url, and wfDeprecated().

Member Function Documentation

◆ getDuration()

MediaWiki\Search\Entity\SearchResultThumbnail::getDuration ( )

Duration of the representation in seconds or null if not applicable.

Returns
int|null

Definition at line 137 of file SearchResultThumbnail.php.

◆ getHeight()

MediaWiki\Search\Entity\SearchResultThumbnail::getHeight ( )

Height of the representation in pixels or null if not applicable.

Returns
int|null

Definition at line 106 of file SearchResultThumbnail.php.

◆ getMimeType()

MediaWiki\Search\Entity\SearchResultThumbnail::getMimeType ( )

Internet mime type for the representation, like "image/png" or "audio/mp3".

Returns
string

Definition at line 114 of file SearchResultThumbnail.php.

◆ getName()

MediaWiki\Search\Entity\SearchResultThumbnail::getName ( )

String that represent file identity in storage or null.

Returns
string|null

Definition at line 145 of file SearchResultThumbnail.php.

◆ getSize()

MediaWiki\Search\Entity\SearchResultThumbnail::getSize ( )
Deprecated
since 1.41, Do not use, resource intensive and thus degrade performance.

Size of the representation in bytes or null if not applicable

Returns
int|null

Definition at line 125 of file SearchResultThumbnail.php.

◆ getUrl()

MediaWiki\Search\Entity\SearchResultThumbnail::getUrl ( )

Full URL to the contents of the file.

Definition at line 90 of file SearchResultThumbnail.php.

◆ getWidth()

MediaWiki\Search\Entity\SearchResultThumbnail::getWidth ( )

Width of the representation in pixels or null if not applicable.

Returns
int|null

Definition at line 98 of file SearchResultThumbnail.php.


The documentation for this class was generated from the following file: