public function ResponseHeaderBag::setCookie

Sets a cookie.

@api

Parameters

Cookie $cookie:

1 call to ResponseHeaderBag::setCookie()
ResponseHeaderBag::clearCookie in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
Clears a cookie in the browser

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php, line 136

Class

ResponseHeaderBag
ResponseHeaderBag is a container for Response HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function setCookie(Cookie $cookie) {
  $this->cookies[$cookie
    ->getDomain()][$cookie
    ->getPath()][$cookie
    ->getName()] = $cookie;
}