public function getController()
    {
        $params         = $this->requestDataReader->getRequestData()->getParameters();
        $controllerName = $this->appConfig->getDefaultInteractor();

        if (isset($params['interactor'])) {
            $controllerName = $params['interactor'];
        };

        $controllerArrayKey = $controllerName.'Controller';

        if (!array_key_exists($controllerArrayKey, $this->controllerFactories)) {
            throw new ControllerNotFoundException('Controller \''.$controllerName.'\' not found.');
        }

        return $this->controllerFactories[$controllerArrayKey]->createInstance();
    }
public function getController()
    {
        $params         = $this->requestDataReader->getRequestData()->getParameters();
        $controllerName = $this->appConfig->getDefaultInteractor();

        if (isset($params['interactor'])) {
            $controllerName = $params['interactor'];
        };

        $controllerArrayKey = $controllerName.'Controller';

        if (!array_key_exists($controllerArrayKey, $this->controllerFactories)) {
            throw new ControllerNotFoundException('Controller \''.$controllerName.'\' not found.');
        }

        return $this->controllerFactories[$controllerArrayKey]->createInstance();
    }
public function getController ( ) { $ params = $ this -> requestDataReader -> getRequestData ( ) -> getParameters ( ) ; $ controllerName = $ this -> appConfig -> getDefaultInteractor ( ) ; if ( isset ( $ params [ 'interactor' ] ) ) { $ controllerName = $ params [ 'interactor' ] ; } ; $ controllerArrayKey = $ controllerName . 'Controller' ; if ( ! array_key_exists ( $ controllerArrayKey , $ this -> controllerFactories ) ) { throw new ControllerNotFoundException ( 'Controller \'' . $ controllerName . '\' not found.' ) ; } return $ this -> controllerFactories [ $ controllerArrayKey ] -> createInstance ( ) ; }
Gets controller instance.
Controller instance is produced with factory of name from request or default name from configuration.

@return IController Instance of produced controller.

@throws ControllerNotFoundException If factory with given name does not exists.
Gets controller instance . Controller instance is produced with factory of name from request or default name from configuration .