Returns the serialized ProductsRequest to retrieve the results behind this facet value

@param  ProductsRequestInterface $request
@return string
172999
public function generateSerializedProductsRequest(ProductsRequestInterface $request)
    {
        $newRequest = clone $request;

        switch ($this->getFacet()->getName()) {
            case 'ShopName':
            case 'ProgramId':
                // There is no valid filter Query for these facets, add debug log

                $request->getAffilinetClient()
                    ->getLog()
                    ->addDebug(
                        'You can not filter SearchProducts with '
                        . $this->getFacet()->getName()
                        . ' Seems like you used this facet and tried to generate a Link or a ProductsRequest for this facets\' results.'
                    );

                break;
            case 'ShopId':

                $newRequest->onlyFromShopIds([$this->getValue()]);
                break;

            case 'ShopCategoryId':
                $newRequest->onlyFromCategories([$this->getValue()], false, false);
                break;

            case 'AffilinetCategoryId':
                $newRequest->onlyFromCategories([$this->getValue()]);
                break;

            default :
                $newRequest->addFilterQuery($this->getFacet()->getName(), $this->getValue());

        }

        return $newRequest->serialize();
    }
371685
public function onRequest( RequestInterface $request ) {
        $schema = $this->getEndpoint()->getSchema();

        return $request->withHeader( 'X-Schema-Version', $schema );
    }
635438
public function getAction(Request $request, $parentId, $variantId)
    {
        $locale = $this->getLocale($request);
        $view = $this->responseGetById(
            $variantId,
            function ($id) use ($locale, $parentId) {
                $product = $this->getProductManager()->findByIdAndLocale($id, $locale);

                if ($product !== null && $product->getParent() && $product->getParent()->getId() == $parentId) {
                    return $product;
                } else {
                    return null;
                }
            }
        );

        return $this->handleView($view);
    }
853992
protected function reviveRequest(ServerRequestInterface $request)
    {
        $isStale = interface_exists('Jasny\HttpMessage\GlobalEnvironmentInterface') &&
            $request instanceof GlobalEnvironmentInterface &&
            $request->isStale();
        
        return $isStale ? $request->revive() : $request;
    }
430297
public function request(RequestInterface $request)
    {
        $response = $this->httpClient->sendRequest($request);
        $data = $this->decodeResponse($response);
        $this->detectError($data);

        return $data;
    }
743080
private function getContext(Request $request): SerializationContext
    {
        $fields = $request->get('fields', ['id']);
        $depth = $request->get('depth', 20);
        $depth = is_numeric($depth) ? (int)$depth : 20;

        if (is_string($fields)) {
            $fields = explode(',', $fields);
        }

        $context = new SerializationContext();
        $context->addExclusionStrategy(new FieldsExclusionStrategy($fields));
        $context->addExclusionStrategy(new DepthExclusionStrategy($depth));

        return $context;
    }
470720
protected function getRequestBody(ServerRequestInterface $request) : string
    {
        if ($decryptedBody = $request->getAttribute('ncryptf-decrypted-body', false)) {
            return $decryptedBody;
        }

        return $request->getBody()->getContents();
    }
1258668
public static function getLabelFromRequest($request)
    {
        $label = Common::getRequestVar('label', array(), 'array', $request);
        if (empty($label)) {
            $label = Common::getRequestVar('label', '', 'string', $request);
            if (!empty($label)) {
                $label = array($label);
            }
        }

        $label = self::unsanitizeLabelParameter($label);
        return $label;
    }
1310762
private function determineContentType(ServerRequestInterface $request)
    {
        $acceptHeader = $request->getHeaderLine('Accept');
        $selectedContentTypes = array_intersect(explode(',', $acceptHeader), $this->knownContentTypes);
        if (count($selectedContentTypes)) {
            return reset($selectedContentTypes);
        }

        return 'text/html';
    }
982475
public function store(ProductRequest $request)
    {
        $product = Product::create($request->all());

        return (new ProductResource($product));
    }
111475
private function cacheKeyFromRequest(RequestInterface $request)
    {
        $uri = $request->getUri();

        $queryStr = $uri->getQuery();
        if (!empty($queryStr)) {
            $queryArr = [];

            parse_str($queryStr, $queryArr);

            $queryArr = $this->parseIgnoredParams($queryArr);
            $queryStr = http_build_query($queryArr);

            $uri = $uri->withQuery($queryStr);
        }

        $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri);
        return $cacheKey;
    }
242952
public static function getServerName(ServerRequestInterface $request): string
    {
        $name = self::getServerParam($request, 'SERVER_NAME');

        if ($name === '-') {
            return self::getHost($request);
        }

        return $name;
    }
1317593
function withRequestOnMatch(RequestInterface $request)
    {
        $requestTarget = $request->getRequestTarget();
        $requestTarget = new StdString($requestTarget);
        $requestTarget = $requestTarget->stripPrefix( rtrim($this->_stripPrefix, '/') );
        $request       = $request->withRequestTarget( (string) $requestTarget );

        return $request;
    }
823632
protected function getHostFromRequest(RequestInterface $request): string
    {
        $host = trim($request->getUri()->getHost(), '/');

        if (array_key_exists($host, $this->domainAliases)) {
            return $this->domainAliases[$host];
        }

        return $host;
    }
947741
public function findAllAction(Request $request)
    {

        $filter['q'] = $request->get('q');
        $em = $this->getDoctrine()->getManager();
        $statusesQb = $em->getRepository('AmulenShopBundle:ProductOrderStatus')->findAllFilteredQB($filter);
        $statuses = $statusesQb->getQuery()->getResult();

        $data = [];
        foreach ($statuses as $status) {
            array_push($data, [
                'id' => $status->getId(),
                'text' => $status->getName()
            ]);
        }

        return new JsonResponse($data);
    }
67620
public function getTokenFromRequest( RequestInterface $request ) {
		if ( $request->get( $this->key ) ) {
			return $request->get( $this->key );
		}

		if ( $request->post( $this->key ) ) {
			return $request->post( $this->key );
		}

		if ( $request->headers( $this->header ) ) {
			return $request->headers( $this->header );
		}

		return '';
	}
445335
public function cgetAction(Request $request)
    {
        $locale = $this->getProductLocaleManager()->retrieveLocale($this->getUser(), $request->get('locale'));
        $queryString = $request->get('query');

        if ($request->get('flat') == 'true') {
            $list = $this->getListRepresentation($request);
        } else {
            $list = new CollectionRepresentation(
                $this->getManager()->findAllByLocaleAndQueryString($locale, $queryString),
                self::$entityKey
            );
        }

        $view = $this->view($list, 200);

        return $this->handleView($view);
    }