summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap/DataMapper
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/SqlMap/DataMapper')
-rw-r--r--framework/Data/SqlMap/DataMapper/TPropertyAccess.php4
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php8
2 files changed, 8 insertions, 4 deletions
diff --git a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php
index a27cb50f..5dbd00eb 100644
--- a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php
+++ b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php
@@ -71,6 +71,8 @@ class TPropertyAccess
$object = $object->{$getter}();
else if(in_array($prop, array_keys(get_object_vars($object))))
$object = $object->{$prop};
+ elseif(method_exists($object, '__get') && is_callable(array($object, '__get')))
+ $object = $object->{$prop};
else
throw new TInvalidPropertyException('sqlmap_invalid_property',$path);
}
@@ -106,6 +108,8 @@ class TPropertyAccess
$object = $object->{$getter}();
else if(in_array($prop, array_keys(get_object_vars($object))))
$object = $object->{$prop};
+ elseif(method_exists($object, '__get') && is_callable(array($object, '__get')))
+ $object = $object->{$prop};
else
return false;
}
diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php b/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php
index 86171c1e..68b0c638 100644
--- a/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php
+++ b/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php
@@ -4,7 +4,7 @@
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Data.SqlMap
@@ -178,7 +178,7 @@ class TSqlMapPagedList extends TPagedList
*/
public function getIsNextPageAvailable()
{
- return !is_null($this->_nextPageList);
+ return $this->_nextPageList!==null;
}
/**
@@ -186,7 +186,7 @@ class TSqlMapPagedList extends TPagedList
*/
public function getIsPreviousPageAvailable()
{
- return !is_null($this->_prevPageList);
+ return $this->_prevPageList!==null;
}
/**
@@ -194,7 +194,7 @@ class TSqlMapPagedList extends TPagedList
*/
public function getIsLastPage()
{
- return is_null($this->_nextPageList) || $this->_nextPageList->getCount() < 1;
+ return ($this->_nextPageList===null) || $this->_nextPageList->getCount() < 1;
}
/**