| ILIAS
    Release_4_1_x_branch Revision 61804
    | 
Represents a measurable length, with a string numeric magnitude and a unit. More...
 Collaboration diagram for HTMLPurifier_Length:
 Collaboration diagram for HTMLPurifier_Length:| Public Member Functions | |
| __construct ($n= '0', $u=false) | |
| toString () | |
| Returns string representation of number. | |
| getN () | |
| Retrieves string numeric magnitude. | |
| getUnit () | |
| Retrieves string unit. | |
| isValid () | |
| Returns true if this length unit is valid. | |
| compareTo ($l) | |
| Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal. | |
| Static Public Member Functions | |
| static | make ($s) | 
| Protected Member Functions | |
| validate () | |
| Validates the number and unit. | |
| Protected Attributes | |
| $n | |
| String numeric magnitude. | |
| $unit | |
| String unit. | |
| $isValid | |
| Whether or not this length is valid. | |
| Static Protected Attributes | |
| static | $allowedUnits | 
| Lookup array of units recognized by CSS 2.1. | |
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 | |||
| ) | 
| HTMLPurifier_Length::compareTo | ( | $l | ) | 
Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
Definition at line 103 of file Length.php.
References n.
| HTMLPurifier_Length::getN | ( | ) | 
Retrieves string numeric magnitude.
Definition at line 83 of file Length.php.
References $n.
| HTMLPurifier_Length::getUnit | ( | ) | 
Retrieves string unit.
Definition at line 88 of file Length.php.
References $unit.
| HTMLPurifier_Length::isValid | ( | ) | 
Returns true if this length unit is valid.
Definition at line 93 of file Length.php.
References $isValid, and validate().
Referenced by toString().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller 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 46 of file Length.php.
| HTMLPurifier_Length::toString | ( | ) | 
Returns string representation of number.
Definition at line 75 of file Length.php.
References $unit, isValid(), and n.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | protected | 
Validates the number and unit.
Definition at line 58 of file Length.php.
References $allowedUnits, $result, and n.
Referenced by isValid().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | staticprotected | 
Lookup array of units recognized by CSS 2.1.
Definition at line 28 of file Length.php.
Referenced by validate().
| 
 | protected | 
Whether or not this length is valid.
Null if not calculated yet.
Definition at line 23 of file Length.php.
Referenced by isValid().
| 
 | protected | 
String numeric magnitude.
Definition at line 13 of file Length.php.
Referenced by __construct(), getN(), and make().
| 
 | protected | 
String unit.
False is permitted if $n = 0.
Definition at line 18 of file Length.php.
Referenced by getUnit(), make(), and toString().