You are here

public function ResponseHeaderBag::setCookie in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/ResponseHeaderBag.php \Symfony\Component\HttpFoundation\ResponseHeaderBag::setCookie()

Sets a cookie.

Parameters

Cookie $cookie:

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

File

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

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;
}