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
1 files changed, 4 insertions, 0 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;
}