HTMLPurifier 4.4.0
HTMLPurifier_ChildDef_Empty Class Reference

Definition that disallows all elements. More...

Inheritance diagram for HTMLPurifier_ChildDef_Empty:
HTMLPurifier_ChildDef HTMLPurifier_ChildDef

List of all members.

Public Member Functions

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

Public Attributes

 $allow_empty = true
 Bool that indicates whether or not an empty array of children is okay.
 $type = 'empty'
 Type of child definition, usually right-most part of class name lowercase.

Detailed Description

Definition that disallows all elements.

Warning:
validateChildren() in this class is actually never called, because empty elements are corrected in HTMLPurifier_Strategy_MakeWellFormed before child definitions are parsed in earnest by HTMLPurifier_Strategy_FixNesting.

Definition at line 10 of file Empty.php.


Constructor & Destructor Documentation

HTMLPurifier_ChildDef_Empty::__construct ( )

Definition at line 14 of file Empty.php.

HTMLPurifier_ChildDef_Empty::__construct ( )

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


Member Function Documentation

HTMLPurifier_ChildDef_Empty::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.

Definition at line 15 of file Empty.php.

HTMLPurifier_ChildDef_Empty::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.

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


Member Data Documentation

HTMLPurifier_ChildDef_Empty::$allow_empty = true

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.

Definition at line 12 of file Empty.php.

HTMLPurifier_ChildDef_Empty::$type = 'empty'

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

Used occasionally in terms of context.

Reimplemented from HTMLPurifier_ChildDef.

Definition at line 13 of file Empty.php.


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