Properties

$targetAnchorPosition

$targetAnchorPosition : 

Type

$originAnchorPosition

$originAnchorPosition : 

Type

$targetComponentIdentifier

$targetComponentIdentifier : 

Type

$rangeStart

$rangeStart : 

Type

$rangeLength

$rangeLength : 

Type

Methods

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.

__construct()

__construct(mixed  $target_anchor_position) 

Implements __construct().

Parameters

mixed $target_anchor_position

TargetAnchorPosition.

getTargetAnchorPosition()

getTargetAnchorPosition() 

Getter for targetAnchorPosition.

setTargetAnchorPosition()

setTargetAnchorPosition(mixed  $value) : $this

Setter for targetAnchorPosition.

Parameters

mixed $value

TargetAnchorPosition.

Returns

$this

getOriginAnchorPosition()

getOriginAnchorPosition() 

Getter for originAnchorPosition.

setOriginAnchorPosition()

setOriginAnchorPosition(mixed  $value) : $this

Setter for originAnchorPosition.

Parameters

mixed $value

OriginAnchorPosition.

Returns

$this

getTargetComponentIdentifier()

getTargetComponentIdentifier() 

Getter for targetComponentIdentifier.

setTargetComponentIdentifier()

setTargetComponentIdentifier(mixed  $value) : $this

Setter for targetComponentIdentifier.

Parameters

mixed $value

TargetComponentIdentifier.

Returns

$this

getRangeStart()

getRangeStart() 

Getter for rangeStart.

setRangeStart()

setRangeStart(integer  $value) : $this

Setter for rangeStart.

Parameters

integer $value

RangeStart.

Returns

$this

getRangeLength()

getRangeLength() 

Getter for rangeLength.

setRangeLength()

setRangeLength(integer  $value) : $this

Setter for rangeLength.

Parameters

integer $value

RangeLength.

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.

validateTargetAnchorPosition()

validateTargetAnchorPosition(  $value) 

Validates the targetAnchorPosition attribute.

Parameters

$value