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

Public Member Functions

 __construct ($inline, $block)
 validateChildren ($tokens_of_children, $config, $context)

Data Fields

 $inline
 $block
 $type = 'chameleon'

Detailed Description

Definition that uses different definitions depending on context.

The del and ins tags are notable because they allow different types of elements depending on whether or not they're in a block or inline context. Chameleon allows this behavior to happen by using two different definitions depending on context. While this somewhat generalized, it is specifically intended for those two tags.

Definition at line 12 of file Chameleon.php.


Constructor & Destructor Documentation

__construct ( inline,
block 
)
Parameters:
$inlineList of elements to allow when inline.
$blockList of elements to allow when block.

Definition at line 31 of file Chameleon.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.

Definition at line 37 of file Chameleon.php.


Field Documentation

$block

Instance of the definition object to use when block.

Definition at line 23 of file Chameleon.php.

$inline

Instance of the definition object to use when inline. Usually stricter.

Definition at line 18 of file Chameleon.php.

$type = 'chameleon'

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 25 of file Chameleon.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations