Sets a cookie.
@api
Parameters
Cookie $cookie:
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;
}