HTMLPurifier/IDAccumulator.php Quellcode

IDAccumulator.php
gehe zur Dokumentation dieser Datei
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




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.