Size
extends PrimitiveValue
in package
A `Size` consists of a numeric `size` value and a unit.
Table of Contents
- $bIsColorComponent : bool
- $fSize : float
- $SIZE_UNITS : array<int, array<string, string>>|null
- $sUnit : string|null
- __construct() : mixed
- __toString() : string
- getSize() : float
- getUnit() : string|null
- isColorComponent() : bool
- isRelative() : bool
- isSize() : false
- Returns whether the number stored in this Size really represents a size (as in a length of something on screen).
- render() : string
- setSize() : mixed
- setUnit() : void
- getSizeUnits() : array<int, array<string, string>>
- parseMicrosoftFilter() : CSSFunction
- parseUnicodeRangeValue() : string
Properties
$bIsColorComponent
private
bool
$bIsColorComponent
$fSize
private
float
$fSize
$SIZE_UNITS
private
static array<int, array<string, string>>|null
$SIZE_UNITS
= null
$sUnit
private
string|null
$sUnit
Methods
__construct()
public
__construct(float|int|string $fSize[, string|null $sUnit = null ][, bool $bIsColorComponent = false ], int $iLineNo) : mixed
Parameters
- $fSize : float|int|string
- $sUnit : string|null = null
- $bIsColorComponent : bool = false
- $iLineNo : int
Return values
mixed —__toString()
public
__toString() : string
Tags
Return values
string —getSize()
public
getSize() : float
Return values
float —getUnit()
public
getUnit() : string|null
Return values
string|null —isColorComponent()
public
isColorComponent() : bool
Return values
bool —isRelative()
public
isRelative() : bool
Return values
bool —isSize()
Returns whether the number stored in this Size really represents a size (as in a length of something on screen).
public
isSize() : false
Return values
false — if the unit an angle, a duration, a frequency or the number is a component in a Color object.render()
public
render(OutputFormat|null $oOutputFormat) : string
Parameters
- $oOutputFormat : OutputFormat|null
Return values
string —setSize()
public
setSize(float|int|string $fSize) : mixed
Parameters
- $fSize : float|int|string
Return values
mixed —setUnit()
public
setUnit(string $sUnit) : void
Parameters
- $sUnit : string
Return values
void —getSizeUnits()
private
static getSizeUnits() : array<int, array<string, string>>
Return values
array<int, array<string, string>> —parseMicrosoftFilter()
private
static parseMicrosoftFilter(ParserState $oParserState) : CSSFunction
Parameters
- $oParserState : ParserState
Tags
Return values
CSSFunction —parseUnicodeRangeValue()
private
static parseUnicodeRangeValue(ParserState $oParserState) : string
Parameters
- $oParserState : ParserState
