Exception type: | HTTP404Exception |
Code: | 0 |
Message: | |
Trace: | #0 [internal function]: ProjectController->view('31') #1 /home/users/r/rd-proekt/domains/_private/rdproekt/lib/framework/controller/controller.php(53): call_user_func_array(Array, Array) #2 /home/users/r/rd-proekt/domains/_private/rdproekt/lib/framework/controller/controller.php(29): Controller->executeAction('view') #3 /home/users/r/rd-proekt/domains/_private/rdproekt/lib/framework/application.php(56): Controller->run() #4 /home/users/r/rd-proekt/domains/rdproekt.ru/index.php(24): Application->run() #5 /home/users/r/rd-proekt/domains/rdproekt.ru/index.php(56): init() #6 {main} |
# 1| class ProjectController extends BaseController { # 2| public function index() { # 3| $this->app->redirect('/project/categories/'); # 4| } # 5| # 6| public function view($projectId) { # 7| $project = $this->app->db->find('Project', $projectId); # 8| if ($project == null)
# 9| throw new HTTP404Exception();
# 10| # 11| $this->addNavChain("Наши проекты", "/project/categories/"); # 12| $this->addNavChain(Project::getTypeName($project->getProjectType()), "/project/category/" . $project->getProjectType()); # 13| # 14| $this->set(array( # 15| 'project' => $project, # 16| ));
# 44| # 45| if (!in_array($actionCamel, get_class_methods($this))) # 46| throw new HTTP404Exception("Controller " . get_class($this) . " doesn't have action `{$actionCamel}'!"); # 47| # 48| if ($this->checkPermissions() === false) # 49| throw new ForbiddenException(); # 50| # 51| $this->executed = true;
# 52| call_user_func_array(array($this, $actionCamel), $this->execinfo['params']);
# 53| } # 54| # 55| // Alias to Smarty::assign # 56| protected function set($array, $value = null) { # 57| if ($value != null) { # 58| $this->tpl->assign($array, $value); # 59| }
# 20| $this->app = Application::instance(); # 21| $this->execinfo = $execinfo; # 22| # 23| $this->execinfo['actionCamel'] = CaseConverter::convert($this->execinfo['action'], CaseConverter::SNAKE_CASE, CaseConverter::LOWER_CAMEL_CASE); # 24| } # 25| # 26| public function run() { # 27| $this->tpl = SmartyHelper::getSmarty($this->execinfo);
# 28| $this->executeAction($this->execinfo['actionCamel']);
# 29| # 30| if ($this->userInitiatedTpl) { # 31| $this->renderAction($this->userInitiatedTpl); # 32| } # 33| else { # 34| $this->render(); # 35| }
# 47| # 48| public function run($action = NULL) { # 49| $factory = new ControllersManager(); # 50| # 51| if (!$this->controller || $action) { # 52| $this->controller = $factory->getController($action); # 53| } # 54|
# 55| $this->controller->run();
# 56| return $this; # 57| } # 58| # 59| public function getMode() { # 60| return $this->appMode; # 61| } # 62|
# 15| echo "Stack trace:<br/>\n"; # 16| echo nl2br($e->getTraceAsString()); # 17| } # 18| # 19| die('Fatal error.'); # 20| } # 21| # 22| try {
# 23| $app->run();
# 24| } # 25| catch (ForbiddenException $e) { # 26| Application::redirect('/admin'); # 27| } # 28| catch (ValidationException $e) { # 29| if ($e->remain) { # 30| if (mb_strlen($e->getMessage())) {
# 47| catch (Exception $e) { # 48| throw $app->error; # 49| } # 50| } # 51| } # 52| # 53| # 54| try {
# 55| init();
# 56| } # 57| catch (Exception $e) { # 58| die(nl2br($e)); # 59| } # 60| ?>