PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TSqlMapTypeHandlerRegistry

TTypeHandlerFactory provides type handler classes to convert database field type to PHP types and vice versa.

Package: System\Data\SqlMap
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Since: 3.1
Located at Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php
Methods summary
public TSqlMapTypeHandler
# getDbTypeHandler( string $dbType = 'NULL' )

Parameters

$dbType
string
database field type

Returns

TSqlMapTypeHandler
type handler for give database field type.
public TSqlMapTypeHandler
# getTypeHandler( string $class )

Parameters

$class
string
type handler class name

Returns

TSqlMapTypeHandler
type handler
public
# registerTypeHandler( TSqlMapTypeHandler $handler )

Parameters

$handler
TSqlMapTypeHandler
registers a new type handler
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).

Creates a new instance of a particular class (for PHP primative types, their corresponding default value for given type is used).

Parameters

$type
string
PHP type name

Returns

mixed
default type value, if no type is specified null is returned.

Throws

TSqlMapException
if class name is not found.
public mixed
# convertToType( string $type, mixed $value )

Converts the value to given type using PHP's settype() function.

Converts the value to given type using PHP's settype() function.

Parameters

$type
string
PHP primative type.
$value
mixed
value to be casted

Returns

mixed
type casted value.
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO