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

Breadcrumb

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

function ResponseHeaderBag::setCookie

2 calls to ResponseHeaderBag::setCookie()
ResponseHeaderBag::clearCookie in vendor/symfony/http-foundation/ResponseHeaderBag.php
Clears a cookie in the browser.
ResponseHeaderBag::set in vendor/symfony/http-foundation/ResponseHeaderBag.php
Sets a header by name.

File

vendor/symfony/http-foundation/ResponseHeaderBag.php, line 160

Class

ResponseHeaderBag
ResponseHeaderBag is a container for Response HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function setCookie(Cookie $cookie) : void {
    $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie;
    $this->headerNames['set-cookie'] = 'Set-Cookie';
}

API Navigation

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