public function setControllerName($name = 'index')
    {
        $name = $this->prepareName($name) . 'Controller';

        $this->controllerName = $name;

        $this->controller = $this->di->has($name)
            ? $this->di->get($name)
            : null;
    }
public function setControllerName($name = 'index')
    {
        $name = $this->prepareName($name) . 'Controller';

        $this->controllerName = $name;

        $this->controller = $this->di->has($name)
            ? $this->di->get($name)
            : null;
    }
public function setControllerName ( $ name = 'index' ) { $ name = $ this -> prepareName ( $ name ) . 'Controller' ; $ this -> controllerName = $ name ; $ this -> controller = $ this -> di -> has ( $ name ) ? $ this -> di -> get ( $ name ) : null ; }
Set the name of the controller.

@param string $name of the controller, defaults to 'index'.

@return void
Set the name of the controller .