summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2009-05-01 08:30:05 +0000
committergodzilla80@gmx.net <>2009-05-01 08:30:05 +0000
commitc6904380ac34536c0f3d65d3c92deaa9fa532f4a (patch)
tree7183cfc195539b55942abd77c3422025a880b865 /framework/Data/SqlMap
parentc5b32bfae9b60b59e81276abd8af2b451b92080a (diff)
Fixed Issue #55 - TPropertyAccess.get don't recognize magic getter __get
Diffstat (limited to 'framework/Data/SqlMap')
-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;
}