Class HTMLPurifier_VarParser_Flexible

InheritanceHTMLPurifier_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

Hide inherited properties

PropertyTypeDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined By
getTypeName() HTMLPurifier_VarParser
parse() Validate a variable according to type. HTMLPurifier_VarParser

Protected Methods

Hide inherited methods

MethodDescriptionDefined 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

Method Details

parseImplementation() protected method

protected array|bool|float|int|mixed|null|string parseImplementation ( $var, $type, $allow_null )
$var mixed
$type int
$allow_null bool
throws HTMLPurifier_VarParserException