+<?php\r
+\r
+/**\r
+ * Property list iterator. Do not instantiate this class directly.\r
+ */\r
+class HTMLPurifier_PropertyListIterator extends FilterIterator\r
+{\r
+\r
+ /**\r
+ * @type int\r
+ */\r
+ protected $l;\r
+ /**\r
+ * @type string\r
+ */\r
+ protected $filter;\r
+\r
+ /**\r
+ * @param Iterator $iterator Array of data to iterate over\r
+ * @param string $filter Optional prefix to only allow values of\r
+ */\r
+ public function __construct(Iterator $iterator, $filter = null)\r
+ {\r
+ parent::__construct($iterator);\r
+ $this->l = strlen($filter);\r
+ $this->filter = $filter;\r
+ }\r
+\r
+ /**\r
+ * @return bool\r
+ */\r
+ public function accept()\r
+ {\r
+ $key = $this->getInnerIterator()->key();\r
+ if (strncmp($key, $this->filter, $this->l) !== 0) {\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+}\r
+\r
+// vim: et sw=4 sts=4\r