PHP Class Prado\Data\SqlMap\DataMapper\TSqlMapTypeHandlerRegistry

Since: 3.1
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
convertToType ( $type, $value ) : mixed Converts the value to given type using PHP's settype() function.
createInstanceOf ( $type = '' ) : mixed Creates a new instance of a particular class (for PHP primative types, their corresponding default value for given type is used).
getDbTypeHandler ( $dbType = 'NULL' ) : TSqlMapTypeHandler
getTypeHandler ( $class ) : TSqlMapTypeHandler
registerTypeHandler ( TSqlMapTypeHandler $handler )

Method Details

convertToType() public method

Converts the value to given type using PHP's settype() function.
public convertToType ( $type, $value ) : mixed
return mixed type casted value.

createInstanceOf() public method

Creates a new instance of a particular class (for PHP primative types, their corresponding default value for given type is used).
public createInstanceOf ( $type = '' ) : mixed
return mixed default type value, if no type is specified null is returned.

getDbTypeHandler() public method

public getDbTypeHandler ( $dbType = 'NULL' ) : TSqlMapTypeHandler
return TSqlMapTypeHandler type handler for give database field type.

getTypeHandler() public method

public getTypeHandler ( $class ) : TSqlMapTypeHandler
return TSqlMapTypeHandler type handler

registerTypeHandler() public method

public registerTypeHandler ( TSqlMapTypeHandler $handler )
$handler TSqlMapTypeHandler