Ejemplo n.º 1
0
 /**
  * Returns this node's name.
  *
  * @param $includeParent boolean       	
  * @return string
  */
 public function getName($includeParent = FALSE, $includeCommonPath = FALSE)
 {
     if ($includeParent && $this->parent !== NULL) {
         if (!isset($this->cache['nameIncludingParent'])) {
             $parent = $this->parent->getName(TRUE);
             $this->cache['nameIncludingParent'] = !empty($parent) ? $parent . '/' . $this->name : $this->name;
         }
         return $this->cache['nameIncludingParent'];
     } else {
         if ($this->parent !== NULL) {
             return $this->name;
         } else {
             return $includeCommonPath ? $this->name : '';
         }
     }
 }