private function validate($obj) { try { \Framework\Core\Annotations\AnnotationLoader::init($obj, get_called_class(), true); } catch (\Exception $e) { $this->addError($e->getMessage()); $this->isValid = false; } }
private function initController() { try { $controllerName = $this->controllersNamespace . $this->controllerName . $this->controllersSuffix; $this->controller = new $controllerName(); \Framework\Core\Annotations\AnnotationLoader::init($this->controller, $controllerName, false, $this->actionName); } catch (\Exception $e) { throw new \Exception($e->getMessage(), 404); } }