Properties

$type

$type : 

Type

$attachment

$attachment : 

Type

$URL

$URL : 

Type

$stillURL

$stillURL : 

Type

$fillMode

$fillMode : 

Type

$verticalAlignment

$verticalAlignment : 

Type

$horizontalAlignment

$horizontalAlignment : 

Type

Methods

__construct()

__construct(string  $url, string  $stillURL) 

Implements __construct().

Parameters

string $url

URL.

string $stillURL

URL.

getType()

getType() 

Getter for type.

setType()

setType(boolean  $value) : $this

Setter for type.

Parameters

boolean $value

Type.

Returns

$this

getAttachment()

getAttachment() 

Getter for attachment.

setAttachment()

setAttachment(boolean  $value) : $this

Setter for attachment.

Parameters

boolean $value

Attachment.

Returns

$this

jsonSerialize()

jsonSerialize() 

Implements JsonSerializable::jsonSerialize().

__toString()

__toString() 

Implements __toString().

json()

json() : boolean|string

Generates json representation.

Returns

boolean|string —

JSON string, or FALSE on error.

triggerError()

triggerError(string  $message, integer  $message_type = E_USER_NOTICE) 

Error handler.

Parameters

string $message

Message.

integer $message_type

Matching E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE|E_USER_DEPRECATED.

getUrl()

getUrl() 

Getter for url.

setUrl()

setUrl(string  $value) : $this

Setter for url.

Parameters

string $value

Url.

Returns

$this

getStillURL()

getStillURL() 

Getter for stillURL.

setStillURL()

setStillURL(string  $value) : $this

Setter for stillURL.

Parameters

string $value

Url.

Returns

$this

getFillMode()

getFillMode() 

Getter for fillMode.

setFillMode()

setFillMode(string  $value = 'cover') : $this

Setter for fillMode.

Parameters

string $value

FillMode.

Returns

$this

getVerticalAlignment()

getVerticalAlignment() 

Getter for verticalAlignment.

setVerticalAlignment()

setVerticalAlignment(string  $value = 'center') : $this

Setter for verticalAlignment.

Parameters

string $value

VerticalAlignment.

Returns

$this

getHorizontalAlignment()

getHorizontalAlignment() 

Getter for horizontalAlignment.

setHorizontalAlignment()

setHorizontalAlignment(string  $value = 'center') : $this

Setter for horizontalAlignment.

Parameters

string $value

HorizontalAlignment.

Returns

$this

optional()

optional() 

Define optional properties.

isSupportedUnit()

isSupportedUnit(mixed  $value) : boolean

Helper function to determine if a value is suffixed by a supported unit.

Parameters

mixed $value

Value.

Returns

boolean —

Result.

isUnitInterval()

isUnitInterval(float|integer  $value) : boolean

Helper function to determine if a value is a unit interval.

A unit interval is the closed interval [0,1], that is, the set of all real numbers that are greater than or equal to 0 and less than or equal to 1.

Parameters

float|integer $value

Value.

Returns

boolean —

Result.

isHexColor()

isHexColor(string  $value) : boolean

Helper to validate color hex code.

Valid codes are hexadecimal numbers of length 3, 6 or 8 (with opacity), prefixed with "#".

Parameters

string $value

Value.

Returns

boolean —

Result.

validateFillMode()

validateFillMode(  $value) 

Validates the fillMode attribute.

Parameters

$value

validateVerticalAlignment()

validateVerticalAlignment(  $value) 

Validates the verticalAlignment attribute.

Parameters

$value

validateHorizontalAlignment()

validateHorizontalAlignment(  $value) 

Validates the horizontalAlignment attribute.

Parameters

$value