public function setController($controller, $name = null)
    {
        $controller = $this->app->normalizeClassName($controller, 'Controller');

        return $this->add($controller, $name);
    }
public function setController($controller, $name = null)
    {
        $controller = $this->app->normalizeClassName($controller, 'Controller');

        return $this->add($controller, $name);
    }
public function setController ( $ controller , $ name = null ) { $ controller = $ this -> app -> normalizeClassName ( $ controller , 'Controller' ) ; return $ this -> add ( $ controller , $ name ) ; }
Associate controller with the object.

@param string|object $controller Class or instance of controller
@param string|array  $name       Name or property for new controller

@return AbstractController Newly added controller
Associate controller with the object .