|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Represents a measurable length, with a string numeric magnitude and a unit. More...
Collaboration diagram for HTMLPurifier_Length:Public Member Functions | |
| __construct ($n='0', $u=false) | |
| toString () | |
| Returns string representation of number. More... | |
| getN () | |
| Retrieves string numeric magnitude. More... | |
| getUnit () | |
| Retrieves string unit. More... | |
| isValid () | |
| Returns true if this length unit is valid. More... | |
| compareTo ($l) | |
| Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal. More... | |
Static Public Member Functions | |
| static | make ($s) |
Protected Member Functions | |
| validate () | |
| Validates the number and unit. More... | |
Protected Attributes | |
| $n | |
| String numeric magnitude. More... | |
| $unit | |
| String unit. More... | |
| $isValid | |
| Whether or not this length is valid. More... | |
Static Protected Attributes | |
| static | $allowedUnits |
| Array Lookup array of units recognized by CSS 2.1 @type array. More... | |
Represents a measurable length, with a string numeric magnitude and a unit.
This object is immutable.
Definition at line 7 of file Length.php.
| HTMLPurifier_Length::__construct | ( | $n = '0', |
|
$u = false |
|||
| ) |
| string | $n | Magnitude |
| bool | string | $u | Unit |
Definition at line 41 of file Length.php.
References $n.
| HTMLPurifier_Length::compareTo | ( | $l | ) |
Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
| HTMLPurifier_Length | $l |
Definition at line 144 of file Length.php.
References $l.
| HTMLPurifier_Length::getN | ( | ) |
Retrieves string numeric magnitude.
Definition at line 111 of file Length.php.
References $n.
| HTMLPurifier_Length::getUnit | ( | ) |
Retrieves string unit.
Definition at line 120 of file Length.php.
References $unit.
| HTMLPurifier_Length::isValid | ( | ) |
Returns true if this length unit is valid.
Definition at line 129 of file Length.php.
References $isValid, isValid(), and validate().
Referenced by isValid(), and toString().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
| string | $s | Unit string, like '2em' or '3.4in' |
Definition at line 52 of file Length.php.
Referenced by HTMLPurifier_AttrDef_CSS_Length\__construct(), and HTMLPurifier_AttrDef_CSS_Length\validate().
Here is the caller graph for this function:| HTMLPurifier_Length::toString | ( | ) |
Returns string representation of number.
Definition at line 99 of file Length.php.
References $unit, and isValid().
Here is the call graph for this function:
|
protected |
Validates the number and unit.
Definition at line 70 of file Length.php.
References $allowedUnits, $def, and $result.
Referenced by isValid().
Here is the caller graph for this function:
|
staticprotected |
Array Lookup array of units recognized by CSS 2.1 @type array.
Definition at line 32 of file Length.php.
Referenced by validate().
|
protected |
Whether or not this length is valid.
Null if not calculated yet. @type bool
Definition at line 26 of file Length.php.
Referenced by isValid().
|
protected |
String numeric magnitude.
@type string
Definition at line 14 of file Length.php.
Referenced by __construct(), getN(), and make().
|
protected |
String unit.
False is permitted if $n = 0. @type string|bool
Definition at line 20 of file Length.php.
Referenced by getUnit(), make(), and toString().