summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php')
-rw-r--r--framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php
index e4f5c1fa..dbd4d6e7 100644
--- a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php
+++ b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php
@@ -96,13 +96,17 @@ class TPropertyAccess
return true;
}
- public static function set($object, $path, $value)
+ public static function set(&$object, $path, $value)
{
$properties = explode('.', $path);
$prop = array_pop($properties);
if(count($properties) > 0)
$object = self::get($object, implode('.',$properties));
- if(is_object($object))
+ if(is_array($object) || $object instanceof ArrayAccess)
+ {
+ $object[$prop] = $value;
+ }
+ else if(is_object($object))
{
$setter = 'set'.$prop;
if(is_callable(array($object, $setter)))