HTMLPurifier 4.4.0
HTMLPurifier_ChildDef_Required Class Reference

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

Inheritance diagram for HTMLPurifier_ChildDef_Required:
HTMLPurifier_ChildDef HTMLPurifier_ChildDef HTMLPurifier_ChildDef_Optional HTMLPurifier_ChildDef_Optional HTMLPurifier_ChildDef_StrictBlockquote HTMLPurifier_ChildDef_StrictBlockquote

List of all members.

Public Member Functions

 __construct ($elements)
 validateChildren ($tokens_of_children, $config, $context)
 Validates nodes according to definition and returns modification.
 __construct ($elements)
 validateChildren ($tokens_of_children, $config, $context)
 Validates nodes according to definition and returns modification.

Public Attributes

 $elements = array()
 Lookup table of allowed elements.
 $allow_empty = false
 Bool that indicates whether or not an empty array of children is okay.
 $type = 'required'
 Type of child definition, usually right-most part of class name lowercase.

Protected Attributes

 $whitespace = false
 Whether or not the last passed node was all whitespace.

Detailed Description

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

Definition at line 6 of file Required.php.


Constructor & Destructor Documentation

HTMLPurifier_ChildDef_Required::__construct ( elements)
Parameters:
$elementsList of allowed element names (lowercase).

Definition at line 20 of file Required.php.

References $elements.

HTMLPurifier_ChildDef_Required::__construct ( elements)
Parameters:
$elementsList of allowed element names (lowercase).

Definition at line 11604 of file HTMLPurifier.standalone.php.

References $elements.


Member Function Documentation

HTMLPurifier_ChildDef_Required::validateChildren ( tokens_of_children,
config,
context 
)

Validates nodes according to definition and returns modification.

Parameters:
$tokens_of_childrenArray of HTMLPurifier_Token
$configHTMLPurifier_Config object
$contextHTMLPurifier_Context object
Returns:
bool true to leave nodes as is
bool false to remove parent node
array of replacement child tokens

Reimplemented from HTMLPurifier_ChildDef.

Reimplemented in HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_StrictBlockquote, HTMLPurifier_ChildDef_Optional, and HTMLPurifier_ChildDef_StrictBlockquote.

Definition at line 37 of file Required.php.

References $config.

HTMLPurifier_ChildDef_Required::validateChildren ( tokens_of_children,
config,
context 
)

Validates nodes according to definition and returns modification.

Parameters:
$tokens_of_childrenArray of HTMLPurifier_Token
$configHTMLPurifier_Config object
$contextHTMLPurifier_Context object
Returns:
bool true to leave nodes as is
bool false to remove parent node
array of replacement child tokens

Reimplemented from HTMLPurifier_ChildDef.

Reimplemented in HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_StrictBlockquote, HTMLPurifier_ChildDef_Optional, and HTMLPurifier_ChildDef_StrictBlockquote.

Definition at line 11621 of file HTMLPurifier.standalone.php.

References $config.


Member Data Documentation

HTMLPurifier_ChildDef_Required::$allow_empty = false

Bool that 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.

Reimplemented from HTMLPurifier_ChildDef.

Reimplemented in HTMLPurifier_ChildDef_Optional, and HTMLPurifier_ChildDef_StrictBlockquote.

Definition at line 35 of file Required.php.

HTMLPurifier_ChildDef_Required::$elements = array()

Lookup table of allowed elements.

Reimplemented from HTMLPurifier_ChildDef.

Definition at line 12 of file Required.php.

Referenced by __construct().

HTMLPurifier_ChildDef_Required::$type = 'required'

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

Used occasionally in terms of context.

Reimplemented from HTMLPurifier_ChildDef.

Reimplemented in HTMLPurifier_ChildDef_Optional, and HTMLPurifier_ChildDef_StrictBlockquote.

Definition at line 36 of file Required.php.

HTMLPurifier_ChildDef_Required::$whitespace = false [protected]

Whether or not the last passed node was all whitespace.

Definition at line 16 of file Required.php.


The documentation for this class was generated from the following files: