Refactoring to maintain the framework standard.
This commit is contained in:
@@ -22,6 +22,7 @@ class Controller
|
||||
|
||||
protected function __construct()
|
||||
{
|
||||
$this->_setController();
|
||||
$this->_setConfig(Config::getInstance()->getConfig());
|
||||
}
|
||||
|
||||
@@ -62,9 +63,13 @@ class Controller
|
||||
/**
|
||||
* @param string $controller
|
||||
*/
|
||||
protected function setController( $controller )
|
||||
private function _setController( )
|
||||
{
|
||||
$this->_controller = $controller;
|
||||
if(array_key_exists( IController::CONTROLLER_REQUEST_NAME, $this->getRequest()) )
|
||||
{
|
||||
$this->_setNext( $this->getRequest()[IController::CONTROLLER_REQUEST_NAME] );
|
||||
$this->_controller = $this->getNext();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user