HTMLPurifier_IDAccumulator Class Reference

Component of HTMLPurifier_AttrContext that accumulates IDs to prevent dupes. More...

List of all members.

Public Member Functions

 add ($id)
 Add an ID to the lookup table.
 load ($array_of_ids)
 Load a list of IDs into the lookup table.
 add ($id)
 Add an ID to the lookup table.
 load ($array_of_ids)
 Load a list of IDs into the lookup table.

Static Public Member Functions

static build ($config, $context)
 Builds an IDAccumulator, also initializing the default blacklist.
static build ($config, $context)
 Builds an IDAccumulator, also initializing the default blacklist.

Public Attributes

 $ids = array()
 Lookup table of IDs we've accumulated.


Detailed Description

Component of HTMLPurifier_AttrContext that accumulates IDs to prevent dupes.

Note:
In Slashdot-speak, dupe means duplicate.

The default constructor does not accept $config or $context objects: use must use the static build() factory method to perform initialization.

Definition at line 9 of file IDAccumulator.php.


Member Function Documentation

static HTMLPurifier_IDAccumulator::build ( config,
context 
) [static]

Builds an IDAccumulator, also initializing the default blacklist.

Parameters:
$config Instance of HTMLPurifier_Config
$context Instance of HTMLPurifier_Context
Returns:
Fully initialized HTMLPurifier_IDAccumulator

Definition at line 24 of file IDAccumulator.php.

Referenced by HTMLPurifier::purify(), and HTMLPurifier_AttrValidator::validateToken().

HTMLPurifier_IDAccumulator::add ( id  ) 

Add an ID to the lookup table.

Parameters:
$id ID to be added.
Returns:
Bool status, true if success, false if there's a dupe

Definition at line 35 of file IDAccumulator.php.

HTMLPurifier_IDAccumulator::load ( array_of_ids  ) 

Load a list of IDs into the lookup table.

Parameters:
$array_of_ids Array of IDs to load
Note:
This function doesn't care about duplicates

Definition at line 45 of file IDAccumulator.php.

static HTMLPurifier_IDAccumulator::build ( config,
context 
) [static]

Builds an IDAccumulator, also initializing the default blacklist.

Parameters:
$config Instance of HTMLPurifier_Config
$context Instance of HTMLPurifier_Context
Returns:
Fully initialized HTMLPurifier_IDAccumulator

Definition at line 4721 of file HTMLPurifier.standalone.php.

HTMLPurifier_IDAccumulator::add ( id  ) 

Add an ID to the lookup table.

Parameters:
$id ID to be added.
Returns:
Bool status, true if success, false if there's a dupe

Definition at line 4732 of file HTMLPurifier.standalone.php.

HTMLPurifier_IDAccumulator::load ( array_of_ids  ) 

Load a list of IDs into the lookup table.

Parameters:
$array_of_ids Array of IDs to load
Note:
This function doesn't care about duplicates

Definition at line 4742 of file HTMLPurifier.standalone.php.


Member Data Documentation

HTMLPurifier_IDAccumulator::$ids = array()

Lookup table of IDs we've accumulated.

Definition at line 16 of file IDAccumulator.php.


The documentation for this class was generated from the following files:
Generated on Thu Jun 19 18:47:31 2008 for HTMLPurifier by  doxygen 1.5.3