Ejemplo n.º 1
0
 /**
  * Returns this node's ID.
  *
  * @return string
  */
 public function getId()
 {
     if (!isset($this->cache['id'])) {
         if ($this->parent === NULL) {
             $this->cache['id'] = 'index';
         } else {
             $parentId = $this->parent->getId();
             if ($parentId == 'index') {
                 $this->cache['id'] = $this->getName();
             } else {
                 $this->cache['id'] = $parentId . '_' . $this->getName();
             }
         }
     }
     return $this->cache['id'];
 }