프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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! |
protected errorGeneric ( mixed $var, integer $type ) | ||
$var | mixed | |
$type | integer |
protected errorInconsistent ( string $class, integer $type ) | ||
$class | string | |
$type | integer |
public static getTypeName ( integer $type ) : string | ||
$type | integer | |
리턴 | string |
public static $stringTypes |