- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages: default System System.Caching System.Collections System.Data System.Data.ActiveRecord System.Data.ActiveRecord.Relations System.Data.ActiveRecord.Scaffold System.Data.ActiveReecord.Scaffold.InputBuilder System.Data.Commom.Sqlite System.Data.Common System.Data.Common.Mssql System.Data.Common.Mysql System.Data.Common.Oracle System.Data.Common.Pgsql System.Data.Common.Sqlite System.Data.DataGateway System.Data.SqlMap System.Data.SqlMap.Configuration System.Data.SqlMap.Statements System.Exceptions System.I18N System.IO System.Security System.Util System.Web System.Web.Services System.Web.UI System.Web.UI.ActiveControls System.Web.UI.WebControls System.Web.UI.WebControls.assets System.Xml Classes: TInvalidPropertyException TLazyLoadList TObjectProxy TPropertyAccess TSqlMapApplicationCache TSqlMapCache TSqlMapConfig TSqlMapConfigurationException TSqlMapDuplicateException TSqlMapException TSqlMapExecutionException TSqlMapFifoCache TSqlMapGateway TSqlMapLruCache TSqlMapManager TSqlMapPagedList TSqlMapTypeHandler TSqlMapTypeHandlerRegistry TSqlMapUndefinedException |
Keyword
# Class TSqlMapTypeHandlerRegistry
TTypeHandlerFactory provides type handler classes to convert database field type to PHP types and vice versa. Since: 3.1 Author: Wei Zhuo <weizho[at]gmail[dot]com>
Method Summary
mixed | convertToType ( string $type, mixed $value) Converts the value to given type using PHP's settype() function.
mixed | createInstanceOf ( string $type) Creates a new instance of a particular class (for PHP primative types, their corresponding default value for given type is used).
TSqlMapTypeHandler | getDbTypeHandler ( string $dbType)
TSqlMapTypeHandler | getTypeHandler ( string $class)
void | registerTypeHandler ( TSqlMapTypeHandler $handler)
Method Details
## convertToType
public mixed convertToType | (string $type , mixed $value )
Converts the value to given type using PHP's settype() function.
Input
string | $type | PHP primative type.
mixed | $value | value to be casted
Output
mixed | type casted value.
Exception
## createInstanceOf
public mixed createInstanceOf | (string $type )
Creates a new instance of a particular class (for PHP primative types, their corresponding default value for given type is used).
Input
string | $type | PHP type name
Output
mixed | default type value, if no type is specified null is returned.
Exception
throws | TSqlMapException if class name is not found.
## getDbTypeHandler
public TSqlMapTypeHandler getDbTypeHandler | (string $dbType )
Input
string | $dbType | database field type
Output
TSqlMapTypeHandler | type handler for give database field type.
Exception
## getTypeHandler
public TSqlMapTypeHandler getTypeHandler | (string $class )
Input
string | $class | type handler class name
Output
TSqlMapTypeHandler | type handler
Exception
## registerTypeHandler
public void registerTypeHandler | (TSqlMapTypeHandler $handler )
Input
TSqlMapTypeHandler | $handler | registers a new type handler
Output
Exception