ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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  {
26  $id_accumulator = new HTMLPurifier_IDAccumulator();
27  $id_accumulator->load($config->get('Attr.IDBlacklist'));
28  return $id_accumulator;
29  }
30 
36  public function add($id)
37  {
38  if (isset($this->ids[$id])) {
39  return false;
40  }
41  return $this->ids[$id] = true;
42  }
43 
49  public function load($array_of_ids)
50  {
51  foreach ($array_of_ids as $id) {
52  $this->ids[$id] = true;
53  }
54  }
55 }
56 
57 // vim: et sw=4 sts=4