Class HTMLPurifier_VarParser_Flexible
Inheritance | HTMLPurifier_VarParser_Flexible » HTMLPurifier_VarParser |
---|
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.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$stringTypes | Lookup table of types that are string, and can have aliases or allowed value lists. | HTMLPurifier_VarParser | |
$types | Lookup table of allowed types. Mainly for backwards compatibility, but also convenient for transforming string type names to the integer constants. | HTMLPurifier_VarParser |
Public Methods
Method | Description | Defined By |
---|---|---|
getTypeName() | HTMLPurifier_VarParser | |
parse() | Validate a variable according to type. | HTMLPurifier_VarParser |
Protected Methods
Method | Description | Defined By |
---|---|---|
error() | Throws an exception. | HTMLPurifier_VarParser |
errorGeneric() | Generic error for if a type didn't work. | HTMLPurifier_VarParser |
errorInconsistent() | Throws an inconsistency exception. | HTMLPurifier_VarParser |
parseImplementation() | HTMLPurifier_VarParser_Flexible |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
ALIST | 9 | HTMLPurifier_VarParser | |
BOOL | 7 | HTMLPurifier_VarParser | |
FLOAT | 6 | HTMLPurifier_VarParser | |
HASH | 10 | HTMLPurifier_VarParser | |
INT | 5 | HTMLPurifier_VarParser | |
ISTRING | 2 | HTMLPurifier_VarParser | |
ITEXT | 4 | HTMLPurifier_VarParser | |
LOOKUP | 8 | HTMLPurifier_VarParser | |
MIXED | 11 | HTMLPurifier_VarParser | |
STRING | 1 | HTMLPurifier_VarParser | |
TEXT | 3 | HTMLPurifier_VarParser |
Method Details
protected array|bool|float|int|mixed|null|string parseImplementation ( $var, $type, $allow_null ) | ||
$var | mixed | |
$type | int | |
$allow_null | bool | |
throws | HTMLPurifier_VarParserException |
---|