4 * Parses string representations into their corresponding native PHP
7 abstract class HTMLPurifier_VarParser
11 * Lookup table of allowed types.
13 static public $types = array(
28 * Validate a variable according to type. Throws
29 * HTMLPurifier_VarParserException if invalid.
30 * It may return NULL as a valid type if $allow_null is true.
32 * @param $var Variable to validate
33 * @param $type Type of variable, see HTMLPurifier_VarParser->types
34 * @param $allow_null Whether or not to permit null as a value
35 * @return Validated and type-coerced variable
37 abstract public function parse($var, $type, $allow_null = false);