Abstract Class HTMLPurifier_ChildDef
Defines allowed child nodes and validates nodes against it.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$allow_empty | Indicates whether or not an empty array of children is okay. | HTMLPurifier_ChildDef | |
$elements | Lookup array of all elements that this definition could possibly allow. | HTMLPurifier_ChildDef | |
$type | Type of child definition, usually right-most part of class name lowercase. | HTMLPurifier_ChildDef |
Public Methods
Method | Description | Defined By |
---|---|---|
getAllowedElements() | Get lookup of tag names that should not close this element automatically. | HTMLPurifier_ChildDef |
validateChildren() | Validates nodes according to definition and returns modification. | HTMLPurifier_ChildDef |
Property Details
This is necessary for redundant checking when changes affecting a child node may cause a parent node to now be disallowed.
Used occasionally in terms of context.
Method Details
Get lookup of tag names that should not close this element automatically.
All other elements will do so.
public array getAllowedElements ( $config ) | ||
$config | HTMLPurifier_Config | HTMLPurifier_Config object |
Validates nodes according to definition and returns modification.
public abstract bool|array validateChildren ( $children, $config, $context ) | ||
$children | HTMLPurifier_Node[] | Array of HTMLPurifier_Node |
$config | HTMLPurifier_Config | HTMLPurifier_Config object |
$context | HTMLPurifier_Context | HTMLPurifier_Context object |
return | bool|array | True to leave nodes as is, false to remove parent node, array of replacement children |
---|