src/Tree.php
public function replace($nodeName, ChildNodeInterface $node)
    {
        $this->removeNodeFromList($nodeName);
        $this->nodes->set($nodeName, $node);
        $this->updateRequired = true;

        return $this;
    }
public function replace($nodeName, ChildNodeInterface $node)
    {
        $this->removeNodeFromList($nodeName);
        $this->nodes->set($nodeName, $node);
        $this->updateRequired = true;

        return $this;
    }
public function replace ( $ nodeName , ChildNodeInterface $ node ) { $ this -> removeNodeFromList ( $ nodeName ) ; $ this -> nodes -> set ( $ nodeName , $ node ) ; $ this -> updateRequired = true ; return $ this ; }
Replaces named tree node to new one.

@param string             $nodeName
@param ChildNodeInterface $node

@return $this
Replaces named tree node to new one .