public function setName($name)
    {
        if ($this->overrideName) {
            throw new Forbidden('This node cannot be renamed');
        }

        list($parentPath) = Uri\split($this->path);
        list(, $newName) = Uri\split($name);

        $newPath = $parentPath.'/'.$newName;
        rename($this->path, $newPath);

        $this->path = $newPath;
    }
public function setName($name)
    {
        if ($this->overrideName) {
            throw new Forbidden('This node cannot be renamed');
        }

        list($parentPath) = Uri\split($this->path);
        list(, $newName) = Uri\split($name);

        $newPath = $parentPath.'/'.$newName;
        rename($this->path, $newPath);

        $this->path = $newPath;
    }
public function setName ( $ name ) { if ( $ this -> overrideName ) { throw new Forbidden ( 'This node cannot be renamed' ) ; } list ( $ parentPath ) = Uri \ split ( $ this -> path ) ; list ( , $ newName ) = Uri \ split ( $ name ) ; $ newPath = $ parentPath . '/' . $ newName ; rename ( $ this -> path , $ newPath ) ; $ this -> path = $ newPath ; }
Renames the node.

@param string $name The new name
Renames the node .