public function createCoreAndController(
        $class,
        \Mmf\Event\EventManagerInterface $eventManager,
        \Mmf\IO\RequestInterface $request,
        \Mmf\IO\ResponseInterface $response,
        \Mmf\View\BasicViewInterface $view,
        \Mmf\Language\LanguageInterface $language,
        \Mmf\Routing\RoutingResolverAbstract $router,
        ErrorControllerInterface $error,
        \Mmf\Parameter\SessionInterface $session,
        \Mmf\Model\ConnectionInterface $connection,
        \Mmf\Auth\AuthInterface $auth
    ) {
        $coreClass = $this->config->get('mvc')['coreClass'];

        if (class_exists($class) && class_exists($coreClass)) {
            $this->core = new $coreClass(
                $this->autoload,
                $this->config,
                $eventManager,
                $request,
                $response,
                $view,
                $language,
                $router,
                $error,
                $session,
                $connection,
                $auth
            );

            $this->controller = new $class($this->core);
            return $this->controller;
        } else {
            $className = is_object($class) ? get_class($class) : $class;
            throw new \Mmf\Core\CoreException('Is not unable to create the controller'
            . ' (' . $className . '), check if the path is correct and if '
            . 'exists the controller or if The CoreClass is correct (' . $coreClass . ')');
        }
    }