PHP 클래스 HTMLPurifier_VarParser, yii

파일 보기 프로젝트 열기: yiisoft/yii 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$stringTypes Lookup table of types that are string, and can have aliases or allowed value lists.
$types Lookup table of allowed types. Mainly for backwards compatibility, but also convenient for transforming string type names to the integer constants.

공개 메소드들

메소드 설명
getTypeName ( integer $type ) : string
parse ( mixed $var, integer $type, boolean $allow_null = false ) : string Validate a variable according to type.

보호된 메소드들

메소드 설명
error ( $msg ) Throws an exception.
errorGeneric ( mixed $var, integer $type ) Generic error for if a type didn't work.
errorInconsistent ( string $class, integer $type ) Throws an inconsistency exception.
parseImplementation ( mixed $var, integer $type, boolean $allow_null ) : string Actually implements the parsing. Base implementation does not do anything to $var. Subclasses should overload this!

메소드 상세

error() 보호된 메소드

Throws an exception.
protected error ( $msg )

errorGeneric() 보호된 메소드

Generic error for if a type didn't work.
protected errorGeneric ( mixed $var, integer $type )
$var mixed
$type integer

errorInconsistent() 보호된 메소드

Throws an inconsistency exception.
protected errorInconsistent ( string $class, integer $type )
$class string
$type integer

getTypeName() 공개 정적인 메소드

public static getTypeName ( integer $type ) : string
$type integer
리턴 string

parse() 최종 공개 메소드

It may return NULL as a valid type if $allow_null is true.
final public parse ( mixed $var, integer $type, boolean $allow_null = false ) : string
$var mixed Variable to validate
$type integer Type of variable, see HTMLPurifier_VarParser->types
$allow_null boolean Whether or not to permit null as a value
리턴 string Validated and type-coerced variable

parseImplementation() 보호된 메소드

Actually implements the parsing. Base implementation does not do anything to $var. Subclasses should overload this!
protected parseImplementation ( mixed $var, integer $type, boolean $allow_null ) : string
$var mixed
$type integer
$allow_null boolean
리턴 string

프로퍼티 상세

$stringTypes 공개적으로 정적으로 프로퍼티

Lookup table of types that are string, and can have aliases or allowed value lists.
public static $stringTypes

$types 공개적으로 정적으로 프로퍼티

Lookup table of allowed types. Mainly for backwards compatibility, but also convenient for transforming string type names to the integer constants.
public static $types