Returns the request body content.
public getContent ( boolean $asResource = false ) : string | resource | ||
$asResource | boolean | If true, a resource will be returned |
return | string | resource | The request body content or a resource to read the body stream |
public function postAction(Request $request) { $repo = $this->get('tekstove.user.repository'); /* @var $repo \Tekstove\ApiBundle\Model\User\UserRepository */ $recaptchaSecret = $this->container->getParameter('tekstove_api.recaptcha.secret'); $requestData = \json_decode($request->getContent(), true); $userData = $requestData['user']; $recaptchaData = $requestData['recaptcha']; $user = new User(); try { $recaptcha = new \ReCaptcha\ReCaptcha($recaptchaSecret); $recaptchaResponse = $recaptcha->verify($recaptchaData['g-recaptcha-response']); if (!$recaptchaResponse->isSuccess()) { $recaptchaException = new UserHumanReadableException("Recaptcha validation failed"); $recaptchaException->addError("recaptcha", "Validation failed"); throw $recaptchaException; } $user->setUsername($userData['username']); $user->setMail($userData['mail']); $user->setPassword($this->hashPassword($userData['password'])); $user->setapiKey(sha1(str_shuffle(uniqid()))); $repo->save($user); } catch (UserHumanReadableException $e) { $view = $this->handleData($request, $e->getErrors()); $view->setStatusCode(400); return $view; } }
/** * Writes a new Entry to the database * * @param Request $request Current http request * * @return \Symfony\Component\HttpFoundation\Response $response Result of action with data (if successful) */ public function postAction(Request $request) { $response = $this->getResponse(); $entityClass = $this->getModel()->getEntityClass(); $record = new $entityClass(); // Insert the new record $record = $this->getModel()->insertRecord($record); // store id of new record so we dont need to reparse body later when needed $request->attributes->set('id', $record->getId()); $file = $this->saveFile($record->getId(), $request->getContent()); // update record with file metadata $meta = new FileMetadata(); $meta->setSize((int) $file->getSize())->setMime($request->headers->get('Content-Type'))->setCreatedate(new \DateTime()); $record->setMetadata($meta); $record = $this->getModel()->updateRecord($record->getId(), $record); // Set status code and content $response->setStatusCode(Response::HTTP_CREATED); $routeName = $request->get('_route'); $routeParts = explode('.', $routeName); $routeType = end($routeParts); if ($routeType == 'post') { $routeName = substr($routeName, 0, -4) . 'get'; } $response->headers->set('Location', $this->getRouter()->generate($routeName, array('id' => $record->getId()))); return $response; }
/** * @Silex\Route( * @Silex\Request(method="POST", uri="channels/{channel}/programs"), * @Silex\Convert(variable="channel", callback="entity.provider:convertChannel") * ) * * Todo: Handle error cases */ public function postChannelProgramsAction(Request $request, Channel $channel) { $program = $this->serializer->deserialize($request->getContent(), ProgramController::PROGRAM_ENTITY, 'json'); $program->setChannel($channel); $channel->addProgram($program); $program->generateUniqueId(); $eliminateDuplicates = function ($person) { $found = $this->em->getRepository('Domora\\TvGuide\\Data\\Person')->findOneByName($person->getName()); return $found ?: $person; }; // Eliminate credits duplicates $credits = $program->getCredits(); if ($credits) { $credits->replacePresenters($eliminateDuplicates); $credits->replaceDirectors($eliminateDuplicates); $credits->replaceWriters($eliminateDuplicates); $credits->replaceActors($eliminateDuplicates); $credits->replaceComposers($eliminateDuplicates); $credits->replaceGuests($eliminateDuplicates); } // Import image if necessary $data = json_decode($request->getContent(), true); if (isset($data['image'])) { $program->importImageFromUrl($data['image']); } try { $this->em->persist($program); $this->em->flush(); } catch (UniqueConstraintViolationException $e) { throw new Error(409, 'PROGRAM_CONFLICT'); } return new Success(200, 'PROGRAM_CREATED', $program); }
/** * Set the current configuration * * @AclAncestor("oro_config_system") * * @return JsonResponse */ public function postAction(Request $request) { $this->configManager->save(json_decode($request->getContent(), true)); $data = json_decode($request->getContent(), true); file_put_contents($this->getMessagesFilePath(), $data['pim_ui___loading_messages']['value']); return $this->getAction(); }
/** * @param Request $request * * @throws ValidationException * @throws MalformedContentException */ public function process(Request $request) { if (!$request->attributes->has(RequestMeta::ATTRIBUTE_URI)) { throw new \UnexpectedValueException("Missing document URI"); } $description = $this->repository->get($request->attributes->get(RequestMeta::ATTRIBUTE_URI)); $operation = $description->getPath($request->attributes->get(RequestMeta::ATTRIBUTE_PATH))->getOperation($request->getMethod()); $body = null; if ($request->getContent()) { $body = json_decode($request->getContent()); if (json_last_error() !== JSON_ERROR_NONE) { throw new MalformedContentException(json_last_error_msg()); } } $result = $this->validator->validate($operation->getRequestSchema(), $coercedParams = $this->parametersAssembler->assemble($operation, $request->query->all(), $request->attributes->all(), $request->headers->all(), $body)); foreach ($coercedParams as $attribute => $value) { /** @var ScalarSchema $schema*/ if (($schema = $operation->getParameter($attribute)->getSchema()) instanceof ScalarSchema) { if ($schema->isDateTime()) { $value = $this->dateTimeSerializer->deserialize($value, $schema); } } $request->attributes->set($attribute, $value); } if ($this->hydrator && ($bodyParam = $description->getRequestBodyParameter($operation->getPath(), $operation->getMethod()))) { $body = $this->hydrator->hydrate($body, $bodyParam->getSchema()); $request->attributes->set($bodyParam->getName(), $body); } $request->attributes->set(RequestMeta::ATTRIBUTE, new RequestMeta($description, $operation)); if (!$result->isValid()) { throw new ValidationException($result->getErrorMessages()); } }
/** * @param LoggerInterface $logger * @param Request $request * @param array $options */ public function __construct(LoggerInterface $logger, Request $request, array $options = array()) { $this->logger = $logger; $this->options = $this->configureOptions($options); $this->request = $request; $this->logger->debug('Create call with params ' . json_encode($this->options)); $this->logger->debug('Request server values: ' . json_encode($this->request->server)); $this->host = $this->request->getClientIp(); $queryBag = $this->request->query; $this->securityCode = $queryBag->has('securityCodeFieldName') ? $queryBag->get('securityCodeFieldName') : ''; $body = $this->request->getContent(); if (!$body) { $this->logger->error('Event content is null'); $this->valid = false; return; } $this->logger->debug('Event content: ' . $body); try { $json = json_decode($body, true); } catch (\Exception $e) { $this->logger->error('Exception on decode json text'); $this->valid = false; } if (!isset($json['ref'])) { $this->valid = false; return; } $count = count($json['commits']) - 1; $this->author = $json['commits'][$count]['author']['email']; $this->authorName = $json['commits'][$count]['author']['name']; $this->message = $json['commits'][$count]['message']; $this->timestamp = $json['commits'][$count]['timestamp']; $this->repository = $json['repository'][$this->options['repositoryFieldName']]; $this->branch = substr($json['ref'], strrpos($json['ref'], '/') + 1); }
public function generateFromRequest(Request $originalRequest) { $this->requestParser->fromXmlString($originalRequest->getContent()); $request = Request::create($this->getRoutePath($this->requestParser), "POST", (array) $this->getParameters($this->requestParser), $originalRequest->cookies->all(), array(), $originalRequest->server->all(), $originalRequest->getContent()); $request->attributes->set('xmlrpc_methodName', $this->requestParser->getMethodName()); return $request; }
/** * Attempts to decode the incoming request's content as JSON. * * @param \Symfony\Component\HttpFoundation\Request $request * * @return mixed * * @throws \Drupal\panels_ipe\Exception\EmptyRequestContentException */ protected static function decodeRequest(Request $request) { if (empty($request->getContent())) { throw new EmptyRequestContentException(); } return Json::decode($request->getContent()); }
/** * @return array */ protected function getRequestPayload() { if ($this->request->headers->get('Content-Type') === 'application/json') { return json_decode($this->request->getContent(), true); } return $this->request->request->all(); }
/** * @param Request $request * @return array */ private function prepareOptions(Request $request) { $options = array(CURLOPT_POST => 1, CURLOPT_HEADER => 0, CURLOPT_URL => $request->getSchemeAndHttpHost() . $request->getRequestUri(), CURLOPT_FRESH_CONNECT => 1, CURLOPT_RETURNTRANSFER => 1, CURLOPT_FORBID_REUSE => 1, CURLOPT_TIMEOUT => 20, CURLOPT_POSTFIELDS => $request->getContent(), CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array('Content-Type: ' . $request->getContentType(), 'Content-Length: ' . strlen($request->getContent()))); foreach ($this->options as $key => $value) { $options[$key] = $value; } return $options; }
/** * @return array */ public function getPostData() { if ('json' === $this->_internalRequest->getContentType()) { return (array) json_decode($this->_internalRequest->getContent(), true); } else { return $this->_internalRequest->request->all(); } }
/** * @return ArrayCollection */ private function getStreamParams() { // get parameters from stream $request = $this->request->getContent(); $requestArray = json_decode($request, true); $streamParams = $requestArray === null ? new ArrayCollection() : new ArrayCollection($requestArray); return $streamParams; }
/** * Parses a request * * @return \AppBundle\Events\Github */ protected function parseRequest() { $content = $this->request->getContent(); $this->request_content = json_decode($content, TRUE); if (!$this->request_content) { //@todo -> throw exception } $this->headers = apache_request_headers(); return $this; }
/** * @see GameControllerTest::unsuccessfulInitAction * @see GameControllerTest::successfulInitAction_JSON * @see GameControllerTest::successfulInitAction_XML * * @ApiDoc( * section = "Game:: Mechanics", * description = "Creates a new game from the submitted data", * input = "EM\GameBundle\Request\GameInitiationRequest", * responseMap = { * 201 = "EM\GameBundle\Response\GameInitiationResponse" * }, * statusCodes = { * 400 = "invalid request" * } * ) * * @param Request $request * * @return Response * @throws \Exception */ public function initAction(Request $request) : Response { if (!$this->get('battleship_game.validator.game_initiation_request')->validate($request->getContent())) { throw new HttpException(Response::HTTP_BAD_REQUEST, 'request validation failed, please check documentation'); } $game = $this->get('battleship_game.service.game_builder')->buildGame(new GameInitiationRequest($request->getContent())); $om = $this->getDoctrine()->getManager(); $om->persist($game); $om->flush(); return $this->prepareSerializedResponse(new GameInitiationResponse($game->getBattlefields()), Response::HTTP_CREATED); }
/** * @param string $collectorName * * @return RequestObject */ public function createFromRequest($collectorName) { $requestObject = new RequestObject(); $requestObject->setHeaders($this->request->headers->all()); $requestObject->setPostParameters($this->request->request->all()); $requestObject->setQueryParameters($this->request->query->all()); $requestObject->setContent($this->request->getContent()); $requestObject->setCollector($collectorName); $requestObject->setUri($this->request->getUri()); $requestObject->setMethod($this->request->getMethod()); return $requestObject; }
/** * Get the input source for the request. * * This is based on Laravel's input source generation. * * @return \Symfony\Component\HttpFoundation\ParameterBag */ protected function getInput() { $type = $this->request->headers->get('CONTENT_TYPE'); // If it's json, decode it if (stripos($type, '/json') !== false || stripos($type, '+json') !== false) { if (is_array($parsed = json_decode($this->request->getContent(), true))) { return $parsed; } } // Yes, we really do want request->request return $this->request->request->all(); }
/** * @Route("/", name="receiveMessage", defaults={"_format"="xml"}) * @Method("POST") */ public function receiveMsgAction(Request $request) { $serializer = $this->get('jms_serializer'); $incomingMsg = $serializer->deserialize($request->getContent(), 'Acme\\MessageBundle\\Entity\\Message', 'xml'); $msgType = $incomingMsg->getMsgType(); if ($msgType === 'text') { $response = $this->forward('AcmeMessageBundle:ReceivingText:index', array("msg" => $request->getContent())); } else { $response = "Error"; } return $response; }
/** * @return mixed */ private function requestJson() { // if we run application from cmd by /runSilexFromCmd.php script we should parse params if ($this->isCommandLineInterface()) { $params = []; foreach ($this->request->request->keys() as $key) { $params[$key] = $this->request->request->get($key); } return $params; } else { return json_decode($this->request->getContent(), true); } }
/** * Get request content. * * @return resource|string * @throws \RuntimeException */ public function getContent() { if ($this->content === null) { try { $this->content = $this->request->getContent(true); } catch (\LogicException $e) { $this->content = $this->request->getContent(false); if (!$this->content) { throw new \RuntimeException('Unable to get request content'); } } } return $this->content; }
/** * @param Request $request * * @throws Exception * * @return PushEvent */ public function create(Request $request) { $event = $request->headers->get('X-GitHub-Event'); $signature = $this->getSignature($request->headers); if ('push' === $event) { return new PushEvent($signature, $request->getContent()); } elseif ('status' === $event) { return new StatusEvent($signature, $request->getContent()); } elseif ('pull_request' === $event) { return new PullRequestEvent($signature, $request->getContent()); } else { throw new Exception('Unsupported webhook event: "' . $event . '" !'); } }
/** * @param Request $request * @param Response $response * @param string $resource * @param \Closure $callback * @return Response */ public function handle(Request $request, Response $response, $resource, $callback) { $accept = $this->negotiator->getBest($request->headers->get('Accept')); $format = $this->negotiator->getFormat($accept->getValue()); if ($format == 'html') { $format = 'json'; } $response->headers->set('Content-Type', $accept->getValue()); try { $manager = $this->managerFactory->create($resource); $context = new DeserializationContext(); $context->enableMaxDepthChecks(); $object = null; $content = $request->getContent(); if (!empty($content)) { $object = $this->serializer->create($request->isMethod('patch') ? 'doctrine' : 'default')->deserialize($request->getContent(), $manager->getClass(), $format, $context); } $data = $this->envelopeFactory->create($callback($manager, $object))->export(); } catch (InvalidException $e) { $response->setStatusCode(400); $data = array("code" => 400, "message" => $e->getMessage(), "errors" => $e->getErrors()); } catch (NotFoundException $e) { $response->setStatusCode(404); $data = array("code" => 404, "message" => $e->getMessage()); } catch (UnsupportedMethodException $e) { $response->setStatusCode(405); $data = array("code" => 405, "message" => $e->getMessage()); } catch (HttpException $e) { $response->setStatusCode($e->getStatusCode()); $data = array("code" => $e->getStatusCode(), "message" => $e->getMessage()); } catch (\Exception $e) { $this->logger->critical($e); $response->setStatusCode(500); $data = array("code" => 500, "message" => $e->getMessage()); } $groups = array('Default', 'lemon_rest', 'lemon_rest_' . $resource, 'lemon_rest_' . $resource . '_' . strtolower($request->getMethod())); if (is_object($data)) { $groups[] = 'lemon_rest_' . $resource . '_view'; } else { $groups[] = 'lemon_rest_' . $resource . '_list'; } $context = SerializationContext::create()->enableMaxDepthChecks(); $context->setGroups($groups); if ($accept->hasParameter('version')) { $context->setVersion($accept->getParameter('version')); } $output = $this->serializer->create('default')->serialize($data, $format, $context); $response->setContent($output); return $response; }
/** * @param \Symfony\Component\HttpFoundation\Request $request */ public function __construct(SymfonyRequest $request) { // before we were checking if $request->request->count() > 0 to // check if a given request is a form submission but in some cases // (Symfony?) merges all parameters (event decoded json body) into // $request->request and it was causing problems. Hopefully this solution // will work in all cases $hasJsonInBody = is_array(json_decode($request->getContent(), true)); $this->request = $request; $this->rawPost = $request->getContent() ? $request->getContent() : array(); $this->post = $request->request->all(); $this->files = $request->files->all(); $this->callType = $hasJsonInBody ? 'batch' : 'form'; $this->isUpload = $request->request->get('extUpload') == 'true'; }
public function handleRequest(Request $request) { $data = json_decode($request->getContent(), true); if (null === $data) { throw new InvalidParameterException($this->container['translator']->trans('invalid_body', [], 'messages', $this->container['locale'])); } if (array_key_exists('id', $data)) { unset($data['id']); } if (array_key_exists('title', $data)) { $data['label'] = $data['title']; unset($data['title']); } if (array_key_exists('folder', $data)) { $data['id_tree'] = $data['folder']; unset($data['folder']); } if (array_key_exists('username', $data)) { $data['login'] = $data['username']; unset($data['username']); } if (array_key_exists('password', $data)) { $data['pw'] = $this->container['api.encoder']->decrypt($data['password']); unset($data['password']); } if (array_key_exists('type', $data)) { unset($data['type']); } return $data; }
/** * @param Request $request * @throws \Seven\RpcBundle\Exception\InvalidXmlRpcContent * @throws \Seven\RpcBundle\Exception\XmlRpcSchemaNotFound * @return MethodCall */ public function createMethodCall(Request $request) { $document = new \DOMDocument(); // Load content $useInternal = libxml_use_internal_errors(true); if ($content = $request->getContent()) { $document->preserveWhiteSpace = false; $document->loadXML($content); } libxml_use_internal_errors($useInternal); if (!$this->validateXml($document, "methodCall")) { throw new InvalidXmlRpcContent('The XML document has not valid XML-RPC content'); } $xpath = new \DOMXPath($document); // extract name $methodName = (string) $xpath->query("//methodCall/methodName")->item(0)->nodeValue; // extract parameters $parameters = array(); $rawParameters = $xpath->query("//methodCall/params/param/value"); for ($index = 0; $index < $rawParameters->length; $index++) { $item = $rawParameters->item($index); if ($item instanceof \DOMElement) { $parameters[] = $this->extract($item); } } return new MethodCall($methodName, $parameters); }
/** * @param Request $request * * @Rest\View(statusCode=204) * @Rest\Post("/webhook", defaults={"_format": "json"}) * * @throws ResourceConflictException * @throws \Exception * @return null */ public function handleWebHookAction(Request $request) { $this->logger->info($request->getContent()); try { $event = null; $store = $this->storeService->getStoreByRequest($request); $eventId = $this->shopifyEventRetriever->verifyWebhookRequest($request, $store); $event = $this->shopifyEventRetriever->retrieve($eventId); if ($event) { throw new EventAlreadyProcessed(sprintf('Event Id %s has already been processed', $eventId)); } //Save the event so we don't process this again $event = Event::createFromRequest($request, $eventId); $this->eventRepository->save($event); $cmd = $this->commandFactory->create($event, $store); $handler = $this->handlerFactory->create($event); $handler->execute($cmd); $event->updateStatus(Event::STATUS_PROCESSED); $this->logger->alert(sprintf('Completed Processing event id %s', $eventId)); } catch (\Exception $e) { if ($event instanceof Event) { $event->updateStatus(Event::STATUS_FAILED); } $this->logger->alert($e->getMessage()); } finally { if ($event instanceof Event) { $this->eventRepository->update($event); } return new Response('', 201); } }
/** * @param Request $request * @param Application $app * * @return Response * * @throws \Exception */ public function installAction(Request $request, Application $app) { $installer = json_decode($request->getContent(), true); $app['logger']->info('Install Callback'); if (json_last_error()) { $app['logger']->error('Install JSON Error: ' . json_last_error_msg()); throw new \Exception('JSON Error'); } $oauthId = $this->getInstallValue($installer, 'oauthId'); $oauthSecret = $this->getInstallValue($installer, 'oauthSecret'); $groupId = $this->getInstallValue($installer, 'groupId', true); $roomId = $this->getInstallValue($installer, 'roomId', true); if ($oauthId === null || $oauthSecret === null || $groupId === null) { throw new \Exception('Invalid installation request'); } $app['logger']->debug(sprintf('Got oauthId "%s" and oauthSecret "%s"', $oauthId, $oauthSecret)); /* @var Registry $registry */ $registry = $app['hc.api_registry']; $registry->install($oauthId, $oauthSecret, $groupId, $roomId); /** @var \Venyii\HipChatCommander\Api\Client $client */ $client = $app['hc.api_client']($oauthId); try { // fetch auth token $authToken = $client->renewAuthToken($oauthId, $oauthSecret); $app['logger']->debug(sprintf('Got authToken "%s"', $authToken)); } catch (\Exception $e) { $registry->uninstall($oauthId); throw $e; } return new Response(null, 200); }
/** * Automatically generated run method * * @param Request $request * @return Response */ public function run(Request $request) { $body = $request->getContent(); if (!isset($body['data'])) { throw new InvalidParameterException(); } $data = $body['data']; $id = $this->getParam('id'); $group = GroupQuery::create()->findOneById($id); if ($group === null) { throw new ResourceNotFoundException('group with id ' . $id . ' does not exist'); } // remove all relationships before UserGroupQuery::create()->filterByGroup($group)->deleteAll(); // add them foreach ($data as $entry) { if (!isset($entry['id'])) { throw new InvalidParameterException(); } $user = UserQuery::create()->findOneById($entry['id']); $group->addUser($user); $group->save(); } // run response return $this->response->run($request, $group); }
/** * execute * * @param Request $request * @param SensioParamConverter $configuration * * @return bool|mixed */ public function execute(Request $request, SensioParamConverter $configuration) { $id = $request->attributes->get('id'); $locale = $request->attributes->get('locale'); $url = $request->attributes->get('url'); $name = $configuration->getName(); $options = $configuration->getOptions(); $resolvedClass = $configuration->getClass(); $method = $request->getMethod(); $rawPayload = $request->getContent(); switch (true) { case 'GET' === $method: $convertedValue = $this->loadEntity($resolvedClass, $id, $locale, $url); break; case 'DELETE' === $method: $convertedValue = $this->loadEntity($resolvedClass, $id, $locale, $url); break; case 'PUT' === $method: $payload = array_merge(array('id' => $id), json_decode($rawPayload, true)); $convertedValue = $this->updateEntity($resolvedClass, json_encode($payload)); break; case 'POST' === $method: $convertedValue = $this->updateEntity($resolvedClass, $rawPayload); break; } return $convertedValue; }
private final function checkLoginHeader(Request $request) { $result = false; if ($request->headers->has($this->securityHeaderKey) && $request->headers->get($this->securityHeaderKey) === $this->securityHeaderValue) { if (!$request->request) { $request->request = new ParameterBag(); } $request->request->add(json_decode($request->getContent(), true)); if ($request->request && $request->request->has('username') && $request->request->has('public_key')) { $username = $request->request->get('username'); $publicKey = $request->request->get('public_key'); $isAdmin = $request->request->get('is_admin', null); $repository = $isAdmin ? 'UnrLabDomainBundle:SuperAdmin' : 'UnrLabDomainBundle:BillUser'; $user = $this->provider->loadUserByKeyAndUsername($publicKey, $username, $repository); if ($user && $user instanceof BaseUser) { if (!$user->getAccessToken()) { $user->generateAccessToken(); $this->manager->flush(); } $result = $this->buildASession($user->getAccessToken(), $repository); } } } return $result; }
/** * {@inheritdoc} */ public function collect(Request $request, Response $response, \Exception $exception = null) { $responseHeaders = $response->headers->all(); $cookies = array(); foreach ($response->headers->getCookies() as $cookie) { $cookies[] = $this->getCookieHeader($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); } if (count($cookies) > 0) { $responseHeaders['Set-Cookie'] = $cookies; } $attributes = array(); foreach ($request->attributes->all() as $key => $value) { if (is_object($value)) { $attributes[$key] = sprintf('Object(%s)', get_class($value)); if (is_callable(array($value, '__toString'))) { $attributes[$key] .= sprintf(' = %s', (string) $value); } } else { $attributes[$key] = $value; } } $content = null; try { $content = $request->getContent(); } catch (\LogicException $e) { // the user already got the request content as a resource $content = false; } $this->data = array('format' => $request->getRequestFormat(), 'content' => $content, 'content_type' => $response->headers->get('Content-Type') ? $response->headers->get('Content-Type') : 'text/html', 'status_code' => $response->getStatusCode(), 'request_query' => $request->query->all(), 'request_request' => $request->request->all(), 'request_headers' => $request->headers->all(), 'request_server' => $request->server->all(), 'request_cookies' => $request->cookies->all(), 'request_attributes' => $attributes, 'response_headers' => $responseHeaders, 'session_attributes' => $request->hasSession() ? $request->getSession()->all() : array(), 'path_info' => $request->getPathInfo()); }