Constants

ALLOWANCE_NO

ALLOWANCE_NO ='no'

ALLOWANCE_PUBLIC

ALLOWANCE_PUBLIC ='public'

ALLOWANCE_SUGGEST

ALLOWANCE_SUGGEST ='suggest'

Properties

$embedUrl

$embedUrl :

Type

$blockable

$blockable :

Type

$id

$id :

Type

$md5File

$md5File :string

The thumbnail MD5 file checksum. This is needed to differ between multiple downloaded images of the same embed file. E.g. a YouTube preview image to changed.

Type

string

$thumbnailUrl

$thumbnailUrl :string

Thumbnail URL.

Type

string

$alternativeThumbnail

$alternativeThumbnail :string

Alternative thumbnail URLs for `$thumbnailUrl`. If a thumbnail URL does not exist, try another one.

Type

string

$title

$title :string

Optional title to this thumbnail.

Type

string

$width

$width :integer

Thumbnail width in px.

Type

integer

$height

$height :integer

Thumbnail height in px.

Type

integer

$forceRatio

$forceRatio :float

Force ratio by percent.

Type

float

$cacheUrl

$cacheUrl :string

Cached thumbnail URL.

Type

string

$error

$error :string

Error message.

Type

string

$allowance

$allowance :integer

See class constants starting with `ALLOWANCE`.

Type

integer

Methods

isAwaitingThumbnailUrl()

isAwaitingThumbnailUrl()

Check if this thumbnail is still awaiting another fetch mechanism (e.g. oEmbed or HTML head parser) to obtain the thumbnail URL.

setMd5File()

setMd5File(string  $md5File)

Setter.

Parameters

string $md5File

setThumbnailUrl()

setThumbnailUrl(string  $thumbnailUrl,string  $provider = null)

Setter.

Parameters

string $thumbnailUrl
string $provider

setTitle()

setTitle(string  $title)

Setter.

Parameters

string $title

setWidth()

setWidth(integer  $width)

Setter.

Parameters

integer $width

setHeight()

setHeight(integer  $height)

Setter.

Parameters

integer $height

setForceRatio()

setForceRatio(float  $ratio)

Setter.

Parameters

float $ratio

setCacheUrl()

setCacheUrl(string  $cacheUrl)

Setter.

Parameters

string $cacheUrl

setError()

setError(string  $error)

Setter.

Parameters

string $error

setAllowance()

setAllowance(integer  $allowance)

Setter.

Parameters

integer $allowance

getEmbedUrl()

getEmbedUrl()

Getter.

getBlockable()

getBlockable()

Getter.

getId()

getId()

Getter.

getMd5File()

getMd5File()

Getter.

getThumbnailUrl()

getThumbnailUrl()

Getter.

getAlternativeThumbnailUrl()

getAlternativeThumbnailUrl()

Getter.

getTitle()

getTitle()

Getter.

getWidth()

getWidth()

Getter.

getHeight()

getHeight()

Getter.

getForceRatio()

getForceRatio()

Getter.

getCacheUrl()

getCacheUrl()

Getter.

getError()

getError()

Getter.

getAllowance()

getAllowance()

Getter.

normalizeTitle()

normalizeTitle(string  $title)

Normalize some titles of known cases.

Parameters

string $title

normalizeEmbedUrl()

normalizeEmbedUrl(string  $embedUrl)

Normalize some URLs of known cases.

Parameters

string $embedUrl