\HTMLPurifier_ChildDef_Required

Definition that allows a set of elements, but disallows empty children.

Summary

Methods
Properties
Constants
getAllowedElements()
validateChildren()
__construct()
$type
$allow_empty
$elements
No constants found
No protected methods found
$whitespace
N/A
No private methods found
No private properties found
N/A

Properties

$type

$type : 

Type of child definition, usually right-most part of class name lowercase.

Used occasionally in terms of context.

Type

$allow_empty

$allow_empty : 

Indicates whether or not an empty array of children is okay.

This is necessary for redundant checking when changes affecting a child node may cause a parent node to now be disallowed.

Type

$elements

$elements : 

Lookup table of allowed elements.

Type

$whitespace

$whitespace : 

Whether or not the last passed node was all whitespace.

Type

Methods

getAllowedElements()

getAllowedElements(\HTMLPurifier_Config  $config) : array

Get lookup of tag names that should not close this element automatically.

All other elements will do so.

Parameters

\HTMLPurifier_Config $config

HTMLPurifier_Config object

Returns

array

validateChildren()

validateChildren(array  $children, \HTMLPurifier_Config  $config, \HTMLPurifier_Context  $context) : array

Validates nodes according to definition and returns modification.

Parameters

array $children

Array of HTMLPurifier_Node

\HTMLPurifier_Config $config

HTMLPurifier_Config object

\HTMLPurifier_Context $context

HTMLPurifier_Context object

Returns

array

__construct()

__construct(array|string  $elements) 

Parameters

array|string $elements

List of allowed element names (lowercase).