Class HTMLPurifier_AttrDef_Switch

InheritanceHTMLPurifier_AttrDef_Switch

Decorator that, depending on a token, switches between two definitions.

Property Details

$tag protected property
protected $tag null
$withTag protected property
protected $withTag null
$withoutTag protected property
protected $withoutTag null

Method Details

__construct() public method

public void __construct ( $tag, $with_tag, $without_tag )
$tag string

Tag name to switch upon

$with_tag HTMLPurifier_AttrDef

Call if token matches tag

$without_tag HTMLPurifier_AttrDef

Call if token doesn't match, or there is no token

validate() public method

public bool|string validate ( $string, $config, $context )
$string string
$config HTMLPurifier_Config
$context HTMLPurifier_Context