(no description)
File Size: | 198 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
HTMLPurifier_VarParser:: (6 methods):
parse()
parseImplementation()
error()
errorInconsistent()
errorGeneric()
getTypeName()
Class: HTMLPurifier_VarParser - X-Ref
Parses string representations into their corresponding native PHPparse($var, $type, $allow_null = false) X-Ref |
Validate a variable according to type. It may return NULL as a valid type if $allow_null is true. param: mixed $var Variable to validate param: int $type Type of variable, see HTMLPurifier_VarParser->types param: bool $allow_null Whether or not to permit null as a value return: string Validated and type-coerced variable |
parseImplementation($var, $type, $allow_null) X-Ref |
Actually implements the parsing. Base implementation does not do anything to $var. Subclasses should overload this! param: mixed $var param: int $type param: bool $allow_null return: string |
error($msg) X-Ref |
Throws an exception. |
errorInconsistent($class, $type) X-Ref |
Throws an inconsistency exception. param: string $class param: int $type |
errorGeneric($var, $type) X-Ref |
Generic error for if a type didn't work. param: mixed $var param: int $type |
getTypeName($type) X-Ref |
param: int $type return: string |