Code refactoring (add autoloader and change files organization)
This commit is contained in:
29
app/Controller/App.php
Normal file
29
app/Controller/App.php
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user