Class HTMLPurifier_VarParser
Parses string representations into their corresponding native PHP variable type. The base implementation does a simple type-check.
final public
Validated
|
|
protected
|
#
parseImplementation( $var, $type, $allow_null )
Actually implements the parsing. Base implementation is to not do anything to $var. Subclasses should overload this! |
protected
|
|
protected
|
|
protected
|
|
public static
|
integer
|
STRING
|
1 |
|
integer
|
ISTRING
|
2 |
|
integer
|
TEXT
|
3 |
|
integer
|
ITEXT
|
4 |
|
integer
|
INT
|
5 |
|
integer
|
FLOAT
|
6 |
|
integer
|
BOOL
|
7 |
|
integer
|
LOOKUP
|
8 |
|
integer
|
ALIST
|
9 |
|
integer
|
HASH
|
10 |
|
integer
|
MIXED
|
11 |
public static
array
|
$types | array(
'string' => self::STRING,
'istring' => self::ISTRING,
'text' => self::TEXT,
'itext' => self::ITEXT,
'int' => self::INT,
'float' => self::FLOAT,
'bool' => self::BOOL,
'lookup' => self::LOOKUP,
'list' => self::ALIST,
'hash' => self::HASH,
'mixed' => self::MIXED
) |
#
Lookup table of allowed types. Mainly for backwards compatibility, but also convenient for transforming string type names to the integer constants. |
public static
array
|
$stringTypes | array(
self::STRING => true,
self::ISTRING => true,
self::TEXT => true,
self::ITEXT => true,
) |
#
Lookup table of types that are string, and can have aliases or allowed value lists. |