\HTMLPurifier_ChildDef_Chameleon
Definition that uses different definitions depending on context.
The del and ins tags are notable because they allow different types of
elements depending on whether or not they're in a block or inline context.
Chameleon allows this behavior to happen by using two different
definitions depending on context. While this somewhat generalized,
it is specifically intended for those two tags.
Synopsis
class HTMLPurifier_ChildDef_Chameleon
extends HTMLPurifier_ChildDef
{
- // Inherited members from HTMLPurifier_ChildDef
- public $type;
- public $allow_empty;
- public array $elements;
- // methods
- public void __construct()
- public void validateChildren()
- // Inherited methods from HTMLPurifier_ChildDef
- public void getAllowedElements()
- public abstract bool validateChildren()
Hierarchy
Extends
Members
public
-
$allow_empty
Bool that indicates whether or not an empty array of children is okay -
$block
Instance of the definition object to use when block. -
$elements
Lookup array of all elements that this definition could possibly allow -
$inline
Instance of the definition object to use when inline. Usually stricter. - $type
-
$type
Type of child definition, usually right-most part of class name lowercase.
Methods
public
Inherited from HTMLPurifier_ChildDef
public
- getAllowedElements() — Get lookup of tag names that should not close this element automatically.
- validateChildren() — Validates nodes according to definition and returns modification.