summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/DataMapper
diff options
context:
space:
mode:
authorwei <>2006-07-23 11:11:21 +0000
committerwei <>2006-07-23 11:11:21 +0000
commitcbb7a11179b9c1c46e35f04d07d6386a44e400b2 (patch)
treedacfc2a5fdbcce3973e228eaca8002ff799e45d1 /framework/DataAccess/SQLMap/DataMapper
parentc0d9d27f16bae2e428225302da144e9cc6d4adc8 (diff)
Update time-tracker demo and add simple dynamic SQLMap
Diffstat (limited to 'framework/DataAccess/SQLMap/DataMapper')
-rw-r--r--framework/DataAccess/SQLMap/DataMapper/TTypeHandlerFactory.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/DataAccess/SQLMap/DataMapper/TTypeHandlerFactory.php b/framework/DataAccess/SQLMap/DataMapper/TTypeHandlerFactory.php
index 55fb1f20..80af4345 100644
--- a/framework/DataAccess/SQLMap/DataMapper/TTypeHandlerFactory.php
+++ b/framework/DataAccess/SQLMap/DataMapper/TTypeHandlerFactory.php
@@ -11,25 +11,25 @@ class TTypeHandlerFactory
$this->_typeHandlerMap = new TMap;
}
- public function getTypeHandler($type, $dbType=null)
+ public function getTypeHandler($type, $dbType='')
{
$dbTypeHandlerMap = $this->_typeHandlerMap[$type];
$handler = null;
if(!is_null($dbTypeHandlerMap))
{
- if(is_null($dbType))
+ if(empty($dbType))
$handler = $dbTypeHandlerMap[self::NullDbType];
else
{
$handler = $dbTypeHandlerMap[$dbType];
- if(is_null($handler))
+ if(is_null($handler))
$handler = $dbTypeHandlerMap[self::NullDbType];
}
}
return $handler;
}
- public function register($type, $handler, $dbType=null)
+ public function register($type, $handler, $dbType='')
{
$map = $this->_typeHandlerMap[$type];
if(is_null($map))
@@ -37,7 +37,7 @@ class TTypeHandlerFactory
$map = new TMap;
$this->_typeHandlerMap->add($type, $map);
}
- if(is_null($dbType))
+ if(empty($dbType))
$map->add(self::NullDbType, $handler);
else
$map->add($dbType, $handler);