Class HTMLPurifier_ChildDef_Chameleon
Inheritance | HTMLPurifier_ChildDef_Chameleon » HTMLPurifier_ChildDef |
---|
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.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$allow_empty | Indicates whether or not an empty array of children is okay. | HTMLPurifier_ChildDef | |
$block | Instance of the definition object to use when block. | HTMLPurifier_ChildDef_Chameleon | |
$elements | Lookup array of all elements that this definition could possibly allow. | HTMLPurifier_ChildDef | |
$inline | Instance of the definition object to use when inline. Usually stricter. | HTMLPurifier_ChildDef_Chameleon | |
$type | HTMLPurifier_ChildDef_Chameleon |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | HTMLPurifier_ChildDef_Chameleon | |
getAllowedElements() | Get lookup of tag names that should not close this element automatically. | HTMLPurifier_ChildDef |
validateChildren() | HTMLPurifier_ChildDef_Chameleon |
Property Details
Method Details
public void __construct ( $inline, $block ) | ||
$inline | array | List of elements to allow when inline. |
$block | array | List of elements to allow when block. |
public bool validateChildren ( $children, $config, $context ) | ||
$children | HTMLPurifier_Node[] | |
$config | HTMLPurifier_Config | |
$context | HTMLPurifier_Context |