getClassName(); } public function getModel(): Model { if ($this->_model === null) { $this->_model = new Model(); // $this->_model->setDebug(true); } return $this->_model; } public function getEntitById(string $id): Entity { $this->getModel()->where($this->getModel()->getPKField(), $id); return $this->getModel()->getEntity(); } }