Moodle  2.2.1
http://www.collinsharper.com
HTMLPurifier_ChildDef_Required Class Reference
Inheritance diagram for HTMLPurifier_ChildDef_Required:
Collaboration diagram for HTMLPurifier_ChildDef_Required:

Public Member Functions

 __construct ($elements)
 validateChildren ($tokens_of_children, $config, $context)

Data Fields

 $elements = array()
 $allow_empty = false
 $type = 'required'

Protected Attributes

 $whitespace = false

Detailed Description

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

Definition at line 6 of file Required.php.


Constructor & Destructor Documentation

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

Definition at line 20 of file Required.php.


Member Function Documentation

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_StrictBlockquote, and HTMLPurifier_ChildDef_Optional.

Definition at line 37 of file Required.php.


Field Documentation

$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.

$elements = array()

Lookup table of allowed elements.

Reimplemented from HTMLPurifier_ChildDef.

Definition at line 12 of file Required.php.

$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.

$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 file:
 All Data Structures Namespaces Files Functions Variables Enumerations