HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/PropertyListIterator.php
Go to the documentation of this file.
00001 <?php
00002 
00006 class HTMLPurifier_PropertyListIterator extends FilterIterator
00007 {
00008 
00009     protected $l;
00010     protected $filter;
00011 
00016     public function __construct(Iterator $iterator, $filter = null) {
00017         parent::__construct($iterator);
00018         $this->l = strlen($filter);
00019         $this->filter = $filter;
00020     }
00021 
00022     public function accept() {
00023         $key = $this->getInnerIterator()->key();
00024         if( strncmp($key, $this->filter, $this->l) !== 0 ) {
00025             return false;
00026         }
00027         return true;
00028     }
00029 
00030 }
00031 
00032 // vim: et sw=4 sts=4