Parses string representations into their corresponding native PHP variable type. The base implementation does a simple type-check.
Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 7528)
| Class | Description |
|---|---|
| HTMLPurifier_VarParser_Flexible | Performs safe variable parsing based on types which can be used by users. This may not be able to represent all possible data inputs, however. |
| HTMLPurifier_VarParser_Native | This variable parser uses PHP's internal code engine. Because it does this, it can represent all inputs; however, it is dangerous and cannot be used by users. |
Lookup table of types that are string, and can have aliases or allowed value lists.
Lookup table of allowed types. Mainly for backwards compatibility, but also convenient for transforming string type names to the integer constants.
Throws an exception.
Generic error for if a type didn't work.
Throws an inconsistency exception.
Validate a variable according to type. Throws HTMLPurifier_VarParserException if invalid.
It may return NULL as a valid type if $allow_null is true.
Actually implements the parsing. Base implementation is to not
do anything to $var. Subclasses should overload this!
Documentation generated on Sun, 06 Mar 2011 00:24:14 -0500 by phpDocumentor 1.4.3