Class HTMLPurifier_AttrDef_Switch
| Inheritance | HTMLPurifier_AttrDef_Switch |
|---|
Decorator that, depending on a token, switches between two definitions.
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $tag | HTMLPurifier_AttrDef_Switch | ||
| $withTag | HTMLPurifier_AttrDef_Switch | ||
| $withoutTag | HTMLPurifier_AttrDef_Switch |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | HTMLPurifier_AttrDef_Switch | |
| validate() | HTMLPurifier_AttrDef_Switch |
Property Details
Method Details
| 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 |
| public bool|string validate ( $string, $config, $context ) | ||
| $string | string | |
| $config | HTMLPurifier_Config | |
| $context | HTMLPurifier_Context | |