+<?php\r
+\r
+/**\r
+ * Defines allowed child nodes and validates nodes against it.\r
+ */\r
+abstract class HTMLPurifier_ChildDef\r
+{\r
+ /**\r
+ * Type of child definition, usually right-most part of class name lowercase.\r
+ * Used occasionally in terms of context.\r
+ * @type string\r
+ */\r
+ public $type;\r
+\r
+ /**\r
+ * Indicates whether or not an empty array of children is okay.\r
+ *\r
+ * This is necessary for redundant checking when changes affecting\r
+ * a child node may cause a parent node to now be disallowed.\r
+ * @type bool\r
+ */\r
+ public $allow_empty;\r
+\r
+ /**\r
+ * Lookup array of all elements that this definition could possibly allow.\r
+ * @type array\r
+ */\r
+ public $elements = array();\r
+\r
+ /**\r
+ * Get lookup of tag names that should not close this element automatically.\r
+ * All other elements will do so.\r
+ * @param HTMLPurifier_Config $config HTMLPurifier_Config object\r
+ * @return array\r
+ */\r
+ public function getAllowedElements($config)\r
+ {\r
+ return $this->elements;\r
+ }\r
+\r
+ /**\r
+ * Validates nodes according to definition and returns modification.\r
+ *\r
+ * @param HTMLPurifier_Node[] $children Array of HTMLPurifier_Node\r
+ * @param HTMLPurifier_Config $config HTMLPurifier_Config object\r
+ * @param HTMLPurifier_Context $context HTMLPurifier_Context object\r
+ * @return bool|array true to leave nodes as is, false to remove parent node, array of replacement children\r
+ */\r
+ abstract public function validateChildren($children, $config, $context);\r
+}\r
+\r
+// vim: et sw=4 sts=4\r