protected function updatePropertyPath(&$objectOrArray, $currentIndex, $value)
{
$property = $this->elements[$currentIndex];
if ($currentIndex + 1 < $this->length) {
if (is_object($objectOrArray)) {
$nestedObject = $this->readProperty($objectOrArray, $currentIndex);
}
// arrays need to be treated separately (due to PHP bug?)
// http://bugs.php.net/bug.php?id=52133
else {
if (!array_key_exists($property, $objectOrArray)) {
$objectOrArray[$property] = array();
}
$nestedObject =& $objectOrArray[$property];
}
$this->updatePropertyPath($nestedObject, $currentIndex + 1, $value);
} else {
$this->updateProperty($objectOrArray, $currentIndex, $value);
}
}