WooCommerce Code Reference

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

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

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
falseif the unit an angle, a duration, a frequency or the number is a component in a Color object.