diff options
Diffstat (limited to 'app/Controller/App.php')
-rw-r--r-- | app/Controller/App.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Controller/App.php b/app/Controller/App.php new file mode 100644 index 00000000..64f9461f --- /dev/null +++ b/app/Controller/App.php @@ -0,0 +1,29 @@ +<?php + +namespace Controller; + +use Model\Project; + +/** + * Application controller + * + * @package controller + * @author Frederic Guillot + */ +class App extends Base +{ + /** + * Redirect to the project creation page or the board controller + * + * @access public + */ + public function index() + { + if ($this->project->countByStatus(Project::ACTIVE)) { + $this->response->redirect('?controller=board'); + } + else { + $this->redirectNoProject(); + } + } +} |