HTMLPurifier_VarParser::parse
Validate a variable according to type. Throws HTMLPurifier_VarParserException if invalid.
It may return NULL as a valid type if $allow_null is true.
Signature
Parameters
$var
— object- to validate
$type
— object- of variable, see HTMLPurifier_VarParser->types
$allow_null
— boolean- or not to permit null as a value
Returns
- Validated
- and type-coerced variable