Improve sidebar menus

This commit is contained in:
Frederic Guillot
2015-08-19 20:59:05 -04:00
parent 7264821cb8
commit 57bd53847c
17 changed files with 155 additions and 76 deletions

View File

@@ -10,6 +10,22 @@ namespace Core;
*/
class Router extends Base
{
/**
* Controller
*
* @access private
* @var string
*/
private $controller = '';
/**
* Action
*
* @access private
* @var string
*/
private $action = '';
/**
* Store routes for path lookup
*
@@ -26,6 +42,28 @@ class Router extends Base
*/
private $urls = array();
/**
* Get action
*
* @access public
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* Get controller
*
* @access public
* @return string
*/
public function getController()
{
return $this->controller;
}
/**
* Get the path to compare patterns
*
@@ -208,6 +246,9 @@ class Router extends Base
return false;
}
$this->action = $method;
$this->controller = $controller;
$instance = new $class($this->container);
$instance->beforeAction($controller, $method);
$instance->$method();