Neos\Fusion\Core\Parser::getValueFromObjectTree PHP Метод

getValueFromObjectTree() защищенный Метод

Retrieves a value from a node in the object tree, specified by the object path array.
protected getValueFromObjectTree ( array $objectPathArray, array &$objectTree = null ) : mixed
$objectPathArray array The object path, specifying the node to retrieve the value of
$objectTree array The current (sub-) tree, used internally - don't specify!
Результат mixed The value
    protected function &getValueFromObjectTree(array $objectPathArray, &$objectTree = null)
    {
        if (is_null($objectTree)) {
            $objectTree =& $this->objectTree;
        }
        if (count($objectPathArray) > 0) {
            $currentKey = array_shift($objectPathArray);
            if ((int) $currentKey > 0) {
                $currentKey = intval($currentKey);
            }
            if (!isset($objectTree[$currentKey])) {
                $objectTree[$currentKey] = array();
            }
            $value =& $this->getValueFromObjectTree($objectPathArray, $objectTree[$currentKey]);
        } else {
            $value =& $objectTree;
        }
        return $value;
    }