32 $this->withTag = $with_tag;
33 $this->withoutTag = $without_tag;
44 $token = $context->get(
'CurrentToken',
true);
45 if (!$token || $token->name !== $this->tag) {
46 return $this->withoutTag->validate($string,
$config, $context);
48 return $this->withTag->validate($string,
$config, $context);
validate($string, $config, $context)
Decorator that, depending on a token, switches between two definitions.
__construct($tag, $with_tag, $without_tag)
$withTag
HTMLPurifier_AttrDef
$withoutTag
HTMLPurifier_AttrDef