library/HTMLPurifier/IDAccumulator.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class HTMLPurifier_IDAccumulator
00010 {
00011     
00016     public $ids = array();
00017     
00024     public static function build($config, $context) {
00025         $id_accumulator = new HTMLPurifier_IDAccumulator();
00026         $id_accumulator->load($config->get('Attr', 'IDBlacklist'));
00027         return $id_accumulator;
00028     }
00029     
00035     public function add($id) {
00036         if (isset($this->ids[$id])) return false;
00037         return $this->ids[$id] = true;
00038     }
00039     
00045     public function load($array_of_ids) {
00046         foreach ($array_of_ids as $id) {
00047             $this->ids[$id] = true;
00048         }
00049     }
00050     
00051 }
00052 

Generated on Thu Jun 19 18:47:26 2008 for HTMLPurifier by  doxygen 1.5.3