Class HTMLPurifier_ChildDef_Custom

InheritanceHTMLPurifier_ChildDef_Custom » HTMLPurifier_ChildDef

Custom validation class, accepts DTD child definitions

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$allow_empty HTMLPurifier_ChildDef_Custom
$dtd_regex Allowed child pattern as defined by the DTD. HTMLPurifier_ChildDef_Custom
$elements Lookup array of all elements that this definition could possibly allow. HTMLPurifier_ChildDef
$type HTMLPurifier_ChildDef_Custom

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_ChildDef_Custom
getAllowedElements() Get lookup of tag names that should not close this element automatically. HTMLPurifier_ChildDef
validateChildren() HTMLPurifier_ChildDef_Custom

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_compileRegex() Compiles the PCRE regex from a DTD regex ($dtd_regex to $_pcre_regex) HTMLPurifier_ChildDef_Custom

Property Details

$allow_empty public property
public $allow_empty false
$dtd_regex public property
public $dtd_regex null
$type public property
public $type 'custom'

Method Details

__construct() public method

public void __construct ( $dtd_regex )
$dtd_regex

Allowed child pattern from the DTD

_compileRegex() protected method

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

protected void _compileRegex ( )
validateChildren() public method

public bool validateChildren ( $children, $config, $context )
$children HTMLPurifier_Node[]
$config HTMLPurifier_Config
$context HTMLPurifier_Context