getClassName(); } protected function getModel(): Model { if ($this->_model === null) { $this->_model = new Model(); // $this->_model->setDebug(true); } return $this->_model; } public function getNews(int $limit = 5): array { $this->getModel()->orderBy($this->getModel()->getPKField(), 'DESC'); $this->getModel()->limit($limit); return $this->getModel()->getEntitys(); } }