Properties

$fontName

$fontName : 

Type

$fontSize

$fontSize : 

Type

$textColor

$textColor : 

Type

$textTransform

$textTransform : 

Type

$underline

$underline : 

Type

$strikethrough

$strikethrough : 

Type

$backgroundColor

$backgroundColor : 

Type

$verticalAlignment

$verticalAlignment : 

Type

$tracking

$tracking : 

Type

$textAlignment

$textAlignment : 

Type

$lineHeight

$lineHeight : 

Type

$dropCapStyle

$dropCapStyle : 

Type

$hyphenation

$hyphenation : 

Type

$linkStyle

$linkStyle : 

Type

Methods

getFontName()

getFontName() 

Getter for fontName.

setFontName()

setFontName(string  $value) : $this

Setter for fontName.

Parameters

string $value

FontName.

Returns

$this

getFontSize()

getFontSize() 

Getter for fontSize.

setFontSize()

setFontSize(integer  $value) : $this

Setter for fontSize.

Parameters

integer $value

FontSize.

Returns

$this

getTextColor()

getTextColor() 

Getter for textColor.

setTextColor()

setTextColor(string  $value) : $this

Setter for textColor.

Parameters

string $value

TextColor.

Returns

$this

getTextTransform()

getTextTransform() 

Getter for textTransform.

setTextTransform()

setTextTransform(string  $value) : $this

Setter for textTransform.

Parameters

string $value

TextTransform.

Returns

$this

getUnderline()

getUnderline() 

Getter for underline.

getStrikethrough()

getStrikethrough() 

Getter for strikethrough.

getBackgroundColor()

getBackgroundColor() 

Getter for backgroundColor.

setBackgroundColor()

setBackgroundColor(string  $value) : $this

Setter for backgroundColor.

Parameters

string $value

BackgroundColor.

Returns

$this

getVerticalAlignment()

getVerticalAlignment() 

Getter for verticalAlignment.

setVerticalAlignment()

setVerticalAlignment(string  $value) : $this

Setter for verticalAlignment.

Parameters

string $value

VerticalAlignment.

Returns

$this

getTracking()

getTracking() 

Getter for tracking.

setTracking()

setTracking(float  $value) : $this

Setter for tracking.

Parameters

float $value

Tracking.

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.

getTextAlignment()

getTextAlignment() 

Getter for textAlignment.

setTextAlignment()

setTextAlignment(string  $value) : $this

Setter for textAlignment.

Parameters

string $value

TextAlignment.

Returns

$this

getLineHeight()

getLineHeight() 

Getter for lineHeight.

setLineHeight()

setLineHeight(integer  $value) : $this

Setter for lineHeight.

Parameters

integer $value

LineHeight.

Returns

$this

getDropCapStyle()

getDropCapStyle() 

Getter for dropCapStyle.

getLinkStyle()

getLinkStyle() 

Getter for linkStyle.

getHyphenation()

getHyphenation() 

Getter for hyphenation.

setHyphenation()

setHyphenation(boolean  $value) : $this

Setter for hyphenation.

Parameters

boolean $value

Hyphenation.

Returns

$this

optional()

optional() 

Define optional properties.

validateTextColor()

validateTextColor(  $value) 

Validates the textColor attribute.

Parameters

$value

validateTextTransform()

validateTextTransform(  $value) 

Validates the textTransform attribute.

Parameters

$value

validateBackgroundColor()

validateBackgroundColor(  $value) 

Validates the backgroundColor attribute.

Parameters

$value

validateVerticalAlignment()

validateVerticalAlignment(  $value) 

Validates the verticalAlignment attribute.

Parameters

$value

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.

validateTextAlignment()

validateTextAlignment(  $value) 

Validates the textAlignment attribute.

Parameters

$value