\HTMLPurifier_Length
Represents a measurable length, with a string numeric magnitude and a unit. This object is immutable.
Synopsis
class HTMLPurifier_Length
{
- // members
- protected $n;
- protected $unit;
- protected $isValid;
- protected static array $allowedUnits = ;
- // methods
- public void __construct()
- public static void make()
- protected void validate()
- public void toString()
- public void getN()
- public void getUnit()
- public void isValid()
- public void compareTo()
Members
protected
-
$allowedUnits
Lookup array of units recognized by CSS 2.1 -
$isValid
Whether or not this length is valid. Null if not calculated yet. -
$n
String numeric magnitude. -
$unit
String unit. False is permitted if $n = 0.
Methods
protected
- validate() — Validates the number and unit.
public
- __construct()
- compareTo() — Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
- getN() — Retrieves string numeric magnitude.
- getUnit() — Retrieves string unit.
- isValid() — Returns true if this length unit is valid.
- make()
- toString() — Returns string representation of number.