public function lastChild() { end($this->children); $key = key($this->children); return $this->getChild($key); }