public function collect() { while (count($this->_tree) > 0) { $this->collectChildren(null, $this->_tree); } return $this->getCollection(); }