@param Request $request

@return Response
554723
public function batchAction(Request $request)
    {
        $view = $this->getGridHandler()->handle(
            $grid = $this->buildGrid(),
            $form = $this->submitGrid($grid, $request)
        );

        if (($api = $this->getParameterResolver()->resolveApi()) && !$form->isValid()) {
            return $this->processAction('batch', $form);
        }

        $batchForm = $this->buildForm(GridBatchType::class, null, ['grid' => $view]);

        if ($this->submitForm($batchForm, $request)->isValid() && $form->isValid()) {
            try {
                $this->getGridBatcher()->batch($grid, $batchForm);
            } catch (DomainException $e) {
                $this->processException($e);
            }
        }

        if (!$api && !$batchForm->isValid()) {
            return $this->processView('batch', $this->view([
                'batch_form' => $batchForm,
                'form'       => $form,
                'grid'       => $view,
            ]));
        }

        return $this->processAction('batch', $batchForm);
    }
265971
public function render(?Request $request = null): Response {
        $request = self::validateRequest($request);

        $translator = $this->translatorProvider->getPreferredTranslator(
            $request->getLanguages(),
            $this->config['default_language']
        );

        $response = new Response();

        $response->setContent($this->templateRenderer->render(
            $this->config['template_name'],
            array_merge($translator->getTranslations(), [
                'lang' => $translator->getLanguage(),
                'charset' => $this->config['charset']
            ])
        )."\n<!-- Powered by progminer/maintenance-screen (https://packagist.org/packages/progminer/maintenance-screen) -->\n");
        $response->headers->set('Content-Language', $translator->translate('lang'));

        return $response;
    }
1305804
public function send(Request $request)
    {
        $response     = new GetSchemaResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);

        $response->name    = $request->name;
        $response->content = (string) $httpResponse->getBody();

        return $response;
    }
1328229
public function send(Request $request)
    {
        $response     = new SearchResponse();
        $httpRequest  = $this->createHttpRequest($request);
        $httpResponse = $this->client->send($httpRequest);
        $json         = $httpResponse->json();
        $result       = $json['response'];

        $response->docs     = $result['docs'];
        $response->numFound = $result['numFound'];
        $response->maxScore = $result['maxScore'];
        $response->docs     = array_map([$this, 'docToArray'], $result['docs']);

        return $response;
    }
234684
public function addAction(Request $request)
    {
        $resource = $this->mapper->create($this->validateRequestParameters($request));

        return new Response('', 201, array('Location' => $this->mapper->generateReadUrl($resource)));
    }
882654
public function browseAction(Request $request)
    {
        $response = $this->convertResourceToPlainText(
            $request->getRequestFormat('xml'),
            $this->mapper->getCollection()
        );

        return new Response($response);
    }
1134705
public function handle(Request $request)
	{
		$response = $this->next($request);

		// If CLI then we have to gather all query, post and header values
		// into params for Oauth_Provider's constructor.
		$params = array();

		if ($this->app->runningInConsole())
		{
			$queryvars = $this->app['request']->get('queryvars');
			$postvars  = $this->app['request']->get('postdata');

			if (!empty($queryvars))
			{
				foreach ($queryvars as $key => $value)
				{
					if (isset($queryvars[$key]))
					{
						$params[$key] = $queryvars[$key];
					}
					else if (isset($postvars[$key]))
					{
						$params[$key] = $postvars[$key];
					}
				}
			}

			if (!empty($postvars))
			{
				foreach ($postvars as $key => $value)
				{
					if (isset($queryvars[$key]))
					{
						$params[$key] = $queryvars[$key];
					}
					else if (isset($postvars[$key]))
					{
						$params[$key] = $postvars[$key];
					}
				}
			}

			if (empty($params))
			{
				return false;
			}
		}

		$this->app['authn'] = $this->app['auth']->authenticate($params);

		$this->app['request']->setVar('validApiKey', !empty($this->app['authn']['consumer_key']));

		return $response;
	}
214392
public function handle(Request $request)
    {
        $response = new Response();
        $response = $this->executePassiveActions($request, $response);
        $response = $this->executeAction($request, $response);

        if ($response->isClientError() || $response->isServerError()) {
            return $this->handleError($request, $response);
        }

        return $response;
    }
918145
public function execute(Request $request): Response
    {
        $method = $request->getMethod();
        list($resp, $grpcStatus) = $request->getClient()->$method(
            $request->getMessage(),
            $request->getMetadata(),
            $request->getOptions()
        )->wait();

        $headers = new HeaderCollection();

        if (is_null($grpcStatus)) { // in the very bad case even this fails to return
            $status = new Error\Status(\Grpc\STATUS_UNKNOWN, '', $headers);
        } else {
            $metadata = $grpcStatus->metadata;
            foreach ($metadata as $k => $v) {
                if (is_array($v)) {
                    foreach ($v as $v2) {
                        $headers->add($k, $v2);
                    }
                } else {
                    $headers->add($k, $v);
                }
            }
            $status = new Error\Status(intval($grpcStatus->code), strval($grpcStatus->details), $headers);
        }

        if (is_null($resp)) {
            $request->fail($status);
        }

        return $request->succeed($resp, $status);
    }
560005
protected function search(Request $request)
    {
        $allResults = $this->repository->search($request->all());
        return Response::apiResponse([
            'data' => $allResults
        ]);
    }
1307404
public function restoreAction(Request $request): Response
    {
        if (!$this->isGranted(new Attribute('content', 'restore'))) {
            return $this->redirect($this->generateUrl('ezplatform.trash.list'));
        }

        $form = $this->formFactory->restoreTrashItem();
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (TrashItemRestoreData $data) {
                $newParentLocation = $data->getLocation();

                foreach ($data->getTrashItems() as $trashItem) {
                    $this->trashService->recover($trashItem, $newParentLocation);
                }

                if (null === $newParentLocation) {
                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Items restored under their original location.") */
                            'trash.restore_original_location.success',
                            [],
                            'trash'
                        )
                    );
                } else {
                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Items restored under '%location%' location.") */
                            'trash.restore_new_location.success',
                            ['%location%' => $newParentLocation->getContentInfo()->name],
                            'trash'
                        )
                    );
                }

                return new RedirectResponse($this->generateUrl('ezplatform.trash.list'));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('ezplatform.trash.list'));
    }
845515
public function send(Request $request)
    {
        $rpbGetReq  = $this->createRpbMessage($request);
        $rpbGetResp = $this->client->send($rpbGetReq, RiakMessageCodes::GET_BUCKET_REQ, RiakMessageCodes::GET_BUCKET_RESP);
        $rpbProps   = $rpbGetResp->getProps();
        $response   = $this->createGetResponse($rpbProps);

        $response->name = $request->bucket;

        return $this->createGetResponse($rpbProps);
    }
1003931
public function send(Request $request)
    {
        foreach ($this->cookies as $cookie) {
            $request->addCookie($cookie);
        }

        $response = $this->client->request($request);

        if ($response->getCookies()) {
            $this->cookies = $response->getCookies();
        }

        return $response;
    }
1221396
public function send(Request $request)
    {
        $response   = new DeleteResponse();
        $rpbPutReq  = $this->createRpbMessage($request);

        $this->client->send($rpbPutReq, RiakMessageCodes::DEL_REQ, RiakMessageCodes::DEL_RESP);

        return $response;
    }
11158
protected function send(Request $request)
    {
        try {
            $response = $this->client->send($request);
        } catch (ClientException $e) {
            $response = $e->getResponse();
        } catch (ServerException $e) {
            $response = $e->getResponse();
        }

        return $response;
    }
905262
public function send(Request $request)
    {
        $response   = new PutResponse();
        $rpbPutReq  = $this->createRpbMessage($request);
        $rpbPutResp = $this->client->send($rpbPutReq, RiakMessageCodes::PUT_REQ, RiakMessageCodes::PUT_RESP);

        if ( ! $rpbPutResp instanceof RpbPutResp) {
            return $response;
        }

        if ( ! $rpbPutResp->hasContent()) {
            return $response;
        }

        if ($rpbPutResp->hasKey()) {
            $response->key = $rpbPutResp->key;
        }

        $response->vClock      = $rpbPutResp->getVclock()->get();
        $response->contentList = $this->createContentList($rpbPutResp->getContentList());

        return $response;
    }
264037
public function handle(Request $request)
    {
        $pathInfo = $request->getPathInfo();

        if (0 === strpos($pathInfo, $this->basePath)) {
            foreach ($this->routes as $config) {
                list($method, $pattern, $controller) = $config;

                if ($request->getMethod() === strtoupper($method)
                    && preg_match('!^' . preg_quote($this->basePath . $pattern, '!') . '$!', $request->getPathInfo())
                ) {
                    return call_user_func($controller, $request);
                }
            }
        }

        return null;
    }