Jackalope\Transport\DoctrineDBAL\Client::nestNode PHP Method

nestNode() private method

Attach a node at a subpath under the ancestor node.
private nestNode ( stdClass $ancestor, stdClass $node, array $nodeNames )
$ancestor stdClass The root node
$node stdClass The node to add
$nodeNames array Breadcrumb of child nodes from parentNode to the node itself
    private function nestNode($ancestor, $node, array $nodeNames)
    {
        while ($name = array_shift($nodeNames)) {
            if (empty($nodeNames)) {
                $ancestor->{$name} = $node;
                return;
            }
            $ancestor = $ancestor->{$name};
        }
    }