XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
HTMLPurifier_ChildDef_Custom Class Reference
Inheritance diagram for HTMLPurifier_ChildDef_Custom:
Inheritance graph

Public Member Functions

 __construct ($dtd_regex)
 
 validateChildren ($tokens_of_children, $config, $context)
 
- Public Member Functions inherited from HTMLPurifier_ChildDef
 getAllowedElements ($config)
 
 validateChildren ($tokens_of_children, $config, $context)
 

Public Attributes

 $allow_empty = false
 
 $dtd_regex
 
 $type = 'custom'
 
- Public Attributes inherited from HTMLPurifier_ChildDef
 $allow_empty
 
 $elements = array()
 
 $type
 

Protected Member Functions

 _compileRegex ()
 

Private Attributes

 $_pcre_regex
 

Detailed Description

Custom validation class, accepts DTD child definitions

Warning
Currently this class is an all or nothing proposition, that is, it will only give a bool return value.

Definition at line 9 of file Custom.php.

Constructor & Destructor Documentation

HTMLPurifier_ChildDef_Custom::__construct (   $dtd_regex)
Parameters
$dtd_regexAllowed child pattern from the DTD

Definition at line 25 of file Custom.php.

References $dtd_regex, and _compileRegex().

Here is the call graph for this function:

Member Function Documentation

HTMLPurifier_ChildDef_Custom::_compileRegex ( )
protected

Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex)

Definition at line 32 of file Custom.php.

Referenced by __construct().

Here is the caller graph for this function:

HTMLPurifier_ChildDef_Custom::validateChildren (   $tokens_of_children,
  $config,
  $context 
)

Definition at line 60 of file Custom.php.

References $token.

Member Data Documentation

HTMLPurifier_ChildDef_Custom::$_pcre_regex
private

PCRE regex derived from $dtd_regex

Definition at line 21 of file Custom.php.

HTMLPurifier_ChildDef_Custom::$allow_empty = false

Definition at line 12 of file Custom.php.

HTMLPurifier_ChildDef_Custom::$dtd_regex

Allowed child pattern as defined by the DTD

Definition at line 16 of file Custom.php.

Referenced by __construct().

HTMLPurifier_ChildDef_Custom::$type = 'custom'

Definition at line 11 of file Custom.php.


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