public function run() { try { AppFactory::router()->dispatch($this->request); } catch (\Exception $exception) { AppFactory::response()->set('exception', $exception)->render('global->error'); } }
public static function taskController() { $controller = new TaskController(); $controller->setResponse(AppFactory::response()); return $controller; }