![]() |
API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|
Public Member Functions | |
| __construct ($n='0', $u=false) | |
| toString () | |
| getN () | |
| getUnit () | |
| isValid () | |
| compareTo ($l) | |
Static Public Member Functions | |
| static | make ($s) |
Protected Member Functions | |
| validate () | |
Protected Attributes | |
| $n | |
| $unit | |
| $isValid | |
Static Protected Attributes | |
| static | $allowedUnits |
Represents a measurable length, with a string numeric magnitude and a unit. This object is immutable.
| __construct | ( | $n = '0', |
|
$u = false |
|||
| ) |
| string | $n | Magnitude |
| bool | string | $u | Unit |
| compareTo | ( | $l | ) |
Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
| HTMLPurifier_Length | $l |
| getN | ( | ) |
Retrieves string numeric magnitude.
| getUnit | ( | ) |
Retrieves string unit.
| isValid | ( | ) |
Returns true if this length unit is valid.


|
static |
| string | $s | Unit string, like '2em' or '3.4in' |

| toString | ( | ) |
Returns string representation of number.

|
protected |
Validates the number and unit.

|
staticprotected |
Array Lookup array of units recognized by CSS 3 @type array
|
protected |
Whether or not this length is valid. Null if not calculated yet. @type bool
|
protected |
String numeric magnitude. @type string
|
protected |
String unit. False is permitted if $n = 0. @type string|bool