\HTMLPurifier_ChildDef_Optional

Definition that allows a set of elements, and allows no children.

Summary

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

Properties

$elements

$elements

Lookup array of all elements that this definition could possibly allow.

$allow_empty

$allow_empty

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

$type

$type

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

$whitespace

$whitespace

Whether or not the last passed node was all whitespace.

Methods

__construct()

__construct(array|string  $elements) : mixed

Parameters

array|string $elements

List of allowed element names (lowercase).

Returns

mixed —

validateChildren()

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

Validates nodes according to definition and returns modification.

Parameters

array $children
\HTMLPurifier_Config $config
\HTMLPurifier_Context $context

Returns

array —

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 —