ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
IDAccumulator.php
Go to the documentation of this file.
1 <?php
2 
10 {
11 
16  public $ids = array();
17 
24  public static function build($config, $context) {
25  $id_accumulator = new HTMLPurifier_IDAccumulator();
26  $id_accumulator->load($config->get('Attr.IDBlacklist'));
27  return $id_accumulator;
28  }
29 
35  public function add($id) {
36  if (isset($this->ids[$id])) return false;
37  return $this->ids[$id] = true;
38  }
39 
45  public function load($array_of_ids) {
46  foreach ($array_of_ids as $id) {
47  $this->ids[$id] = true;
48  }
49  }
50 
51 }
52 
53 // vim: et sw=4 sts=4
$ids
Lookup table of IDs we&#39;ve accumulated.
static build($config, $context)
Builds an IDAccumulator, also initializing the default blacklist.
Component of HTMLPurifier_AttrContext that accumulates IDs to prevent dupes.
add($id)
Add an ID to the lookup table.
load($array_of_ids)
Load a list of IDs into the lookup table.