[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/www/se3/includes/library/HTMLPurifier/ -> VarParser.php (summary)

(no description)

File Size: 198 lines (6 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTMLPurifier_VarParser:: (6 methods):
  parse()
  parseImplementation()
  error()
  errorInconsistent()
  errorGeneric()
  getTypeName()


Class: HTMLPurifier_VarParser  - X-Ref

Parses string representations into their corresponding native PHP
variable type. The base implementation does a simple type-check.

parse($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



Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1