@param $sLang

@return \Symfony\Component\HttpFoundation\Response
179375
public function getDatatablesLanguagefileAction($sLang)
        {

            $sPath = $this->get('kernel')->locateResource('@SlashworksBackendBundle/Resources/public/js/plugins/dataTables/languages/' . $sLang . '.json');

            $response = new Response(file_get_contents($sPath));
            $response->headers->set('Content-Type', 'application/json');

            return $response;
        }
1058729
protected function initRequest(Lang $lang = null)
    {
        $container = $this->getContainer();

        $request = Request::create($this->getBaseUrl($lang));
        $request->setSession(new Session(new MockArraySessionStorage()));
        $container->set("request_stack", new RequestStack());
        $container->get('request_stack')->push($request);

        $requestContext = new RequestContext();
        $requestContext->fromRequest($request);
        $url = $container->get('thelia.url.manager');
        $url->setRequestContext($requestContext);
        $this->getContainer()->get('router.admin')->setContext($requestContext);
    }
1213066
public function getTextAlternatives(
        string $text,
        Language $language
    ): DictionaryResponse {
        /** @var DictionaryResponse $response */
        $response = $this->callApi(__FUNCTION__, func_get_args());

        return $response;
    }
698232
public function getVocabulary($prefix)
    {
        $prefix = self::validateVocabPrefix($prefix);

        // If the prefix has not been registered
        if (empty($this->vocabularies[$prefix])) {
            throw new OutOfBoundsException(
                sprintf(OutOfBoundsException::UNKNOWN_VOCABULARY_PREFIX_STR, $prefix),
                OutOfBoundsException::UNKNOWN_VOCABULARY_PREFIX
            );
        }

        return new Vocabulary($this->vocabularies[$prefix]);
    }
317690
public function negotiateResponseLanguage(Request $req)
    {
        return $this->getLanguageNegotiator()->getBest($req->headers->get('Accept-Language'), $this->langPriorities)->getValue();
    }
228430
public function updateLanguages(ServerRequestInterface $request): ResponseInterface
    {
        $modules = $this->module_service->findByInterface(ModuleLanguageInterface::class, true);

        $this->updateStatus($modules, $request);

        return redirect(route('languages'));
    }
837967
public function handle(Message\ServerRequestInterface $request): Message\ResponseInterface
    {
        if ($this->middleware->valid()) {
            $middleware = $this->middleware->current();
            assert($middleware instanceof MiddlewareInterface, new \TypeError('Invalid middleware type'));
            $this->middleware->next();

            return $middleware->process($request, $this);
        }

        if (null === $this->response) {
            throw new \RuntimeException('No base response provided');
        }

        return $this->response;
    }
133314
public function handle(ServerRequestInterface $request): ResponseInterface
    {
        // Let's recreate a new context object (because request can be modified by the filters)
        $context = new SplashRequestContext($request);
        $context->setUrlParameters($this->splashRoute->getFilledParameters());
        // Let's pass everything to the controller:
        $args = $this->parameterFetcherRegistry->toArguments($context, $this->splashRoute->getParameters());
        $action = $this->splashRoute->getMethodName();
        $controller = $this->controller;

        try {
            $response = SplashUtils::buildControllerResponse(
                function () use ($controller, $action, $args) {
                    return $controller->$action(...$args);
                },
                $this->mode,
                $this->debug
            );
        } catch (SplashException $e) {
            throw new SplashException($e->getMessage(). ' (in '.$this->splashRoute->getControllerInstanceName().'->'.$this->splashRoute->getMethodName().')', $e->getCode(), $e);
        }
        return $response;
    }
593798
public function request($verb, $params = [])
    {
        $xml = $this->getOaiResponse($verb, $params);
        return $this->responseProcessor
            ? $this->responseProcessor->process($xml) : $xml;
    }
110117
public function call(string $method, array $arguments): Response
    {
        try {
            return $this->request('GET', $method, [
                'query' => $arguments
            ]);
        } catch (\Exception $e) {
            throw new ClientException($e->getMessage(), $e->getCode(), $e);
        }
    }
1051904
public function resolve(
        DefinitionInterface $definition, array $parameters = [])
    {
        /** @var CallableDefinition $definition */
        $args = (empty($parameters)) ? $definition->getArgs(): $parameters;
        return call_user_func_array($definition->getCallable(), $args);
    }
779135
public function call(callable $callback): Response
    {
        foreach (self::METADATA_KEYS as $incomingKey => $metadataKey) {
            if (array_key_exists($incomingKey, $_SERVER)) {
                $this->metadata[$metadataKey] = ['' . $_SERVER[$incomingKey]];
            }
            if (array_key_exists($incomingKey, $_REQUEST)) {
                $this->metadata[$metadataKey] = ['' . $_REQUEST[$incomingKey]];
            }
        }
        $response = $callback();
        return $response;
    }
790671
public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = $this->getMiddleware();
        if (is_null($middleware)) {
            throw new \RuntimeException('Un middleware est mal configuré ou aucun middleware défini');
        }
        return call_user_func_array([$middleware, 'process'], [$request, $this]);
    }
633653
public function handle(ServerRequestInterface $request): ResponseInterface
    {
        // Special handling for API requests: they get a proper API response
        if ($this->isApiRequest($request)) {
            return $this->apiResponse();
        }

        // By default, return a simple text message.
        return new HtmlResponse(self::MESSAGE, 503);
    }
625036
protected function _appendCustomLangFiles($aLangFiles, $sLang, $blForAdmin = false)
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $sAppDir = $oConfig->getAppDir();
        $sTheme = $oConfig->getConfigParam("sTheme");
        $sCustomTheme = $oConfig->getConfigParam("sCustomTheme");

        if ($blForAdmin) {
            $aLangFiles[] = $sAppDir . 'views/admin/' . $sLang . '/cust_lang.php';
        } else {
            if ($sTheme) {
                $aLangFiles[] = $sAppDir . 'views/' . $sTheme . '/' . $sLang . '/cust_lang.php';
            }
            if ($sCustomTheme) {
                $aLangFiles[] = $sAppDir . 'views/' . $sCustomTheme . '/' . $sLang . '/cust_lang.php';
            }
        }

        return $aLangFiles;
    }
741514
public function request(string $method, string $url): Response
    {
        return $this->client->request($method, $url, $this->options);
    }
815941
public function getHttpResponseCodeText()
    {
        $code = $this->getHttpResponseCode();
        $statusTexts = \Symfony\Component\HttpFoundation\Response::$statusTexts;

        return (isset($statusTexts[$code])) ? $statusTexts[$code] : null;
    }