public function end() { if ($this->_parent instanceof Nodes) { return $this->_parent; } else { return $this; } }