original_string: 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();
          }
      }
code: 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();
          }
      }
code_tokens: 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 ( ) ; } }
docstring: 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
docstring_tokens: Sets the name of the leaf .