Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ServerRequestInterface.php

function ServerRequestInterface::withCookieParams

Return an instance with the specified cookies.

The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST be compatible with the structure of $_COOKIE. Typically, this data will be injected at instantiation.

This method MUST NOT update the related Cookie header of the request instance, nor related values in the server params.

This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated cookie values.

Parameters

array $cookies Array of key/value pairs representing cookies.:

Return value

static

1 method overrides ServerRequestInterface::withCookieParams()
ServerRequest::withCookieParams in vendor/guzzlehttp/psr7/src/ServerRequest.php
Return an instance with the specified cookies.

File

vendor/psr/http-message/src/ServerRequestInterface.php, line 85

Class

ServerRequestInterface
Representation of an incoming, server-side HTTP request.

Namespace

Psr\Http\Message

Code

public function withCookieParams(array $cookies) : ServerRequestInterface;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal