final public function setName($name, $parentPath = "")
    {
        $this->model->leafName = $name;

        if ($parentPath != "") {
            $this->model->parentPath = $parentPath;
            $this->model->isRootLeaf = false;
        } else {
            $this->model->parentPath = "";
        }

        $this->model->updatePath();

        if ($this->view) {
            $this->view->leafPathChanged();
        }
    }
final public function setName($name, $parentPath = "")
    {
        $this->model->leafName = $name;

        if ($parentPath != "") {
            $this->model->parentPath = $parentPath;
            $this->model->isRootLeaf = false;
        } else {
            $this->model->parentPath = "";
        }

        $this->model->updatePath();

        if ($this->view) {
            $this->view->leafPathChanged();
        }
    }
final public function setName ( $ name , $ parentPath = "" ) { $ this -> model -> leafName = $ name ; if ( $ parentPath != "" ) { $ this -> model -> parentPath = $ parentPath ; $ this -> model -> isRootLeaf = false ; } else { $ this -> model -> parentPath = "" ; } $ this -> model -> updatePath ( ) ; if ( $ this -> view ) { $ this -> view -> leafPathChanged ( ) ; } }
Sets the name of the leaf.

@param $name string The new name for the leaf
@param $parentPath string The leaf path for the containing leaf
Sets the name of the leaf .