Class HTMLPurifier_Length

Description

Represents a measurable length, with a string numeric magnitude and a unit. This object is immutable.

Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 5746)


	
			
Variable Summary
static mixed $allowedUnits
mixed $isValid
mixed $n
mixed $unit
Method Summary
static void make (string $s)
HTMLPurifier_Length __construct ([number $n = '0'], [string $u = false])
void compareTo ( $l)
void getN ()
void getUnit ()
void isValid ()
void toString ()
void validate ()
Variables
static mixed $allowedUnits = array(
'em' => true, 'ex' => true, 'px' => true, 'in' => true,
'cm' => true, 'mm' => true, 'pt' => true, 'pc' => true
)
(line 5767)

Lookup array of units recognized by CSS 2.1

  • access: protected
mixed $isValid (line 5762)

Whether or not this length is valid. Null if not calculated yet.

  • access: protected
mixed $n (line 5752)

String numeric magnitude.

  • access: protected
mixed $unit (line 5757)

String unit. False is permitted if $n = 0.

  • access: protected
Methods
static method make (line 5785)
  • access: public
static void make (string $s)
  • string $s: Unit string, like '2em' or '3.4in'
Constructor __construct (line 5776)
  • access: public
HTMLPurifier_Length __construct ([number $n = '0'], [string $u = false])
  • number $n: Magnitude
  • string $u: Unit
compareTo (line 5842)

Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.

  • access: public
void compareTo ( $l)
  • $l
getN (line 5822)

Retrieves string numeric magnitude.

  • access: public
void getN ()
getUnit (line 5827)

Retrieves string unit.

  • access: public
void getUnit ()
isValid (line 5832)

Returns true if this length unit is valid.

  • access: public
void isValid ()
toString (line 5814)

Returns string representation of number.

  • access: public
void toString ()
validate (line 5797)

Validates the number and unit.

  • access: protected
void validate ()

Documentation generated on Sun, 06 Mar 2011 00:24:10 -0500 by phpDocumentor 1.4.3