summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Util/TDataFieldAccessor.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/framework/Util/TDataFieldAccessor.php b/framework/Util/TDataFieldAccessor.php
index b96cf0c9..e25151db 100644
--- a/framework/Util/TDataFieldAccessor.php
+++ b/framework/Util/TDataFieldAccessor.php
@@ -53,7 +53,15 @@ class TDataFieldAccessor
try
{
if(is_array($data) || ($data instanceof ArrayAccess))
- return $data[$field];
+ {
+ if(isset($data[$field]))
+ return $data[$field];
+
+ $tmp = $data;
+ foreach (explode(".", $field) as $f)
+ $tmp = $tmp[$f];
+ return $tmp;
+ }
else if(is_object($data))
{
if(strpos($field,'.')===false) // simple field
@@ -79,4 +87,3 @@ class TDataFieldAccessor
throw new TInvalidDataValueException('datafieldaccessor_data_invalid',$field);
}
}
-