You are here

public function ResponseHeaderBag::removeCookie in Zircon Profile 8.0

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

Removes a cookie from the array, but does not unset it in the browser.

Parameters

string $name:

string $path:

string $domain:

File

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

Class

ResponseHeaderBag
ResponseHeaderBag is a container for Response HTTP headers.

Namespace

Symfony\Component\HttpFoundation

Code

public function removeCookie($name, $path = '/', $domain = null) {
  if (null === $path) {
    $path = '/';
  }
  unset($this->cookies[$domain][$path][$name]);
  if (empty($this->cookies[$domain][$path])) {
    unset($this->cookies[$domain][$path]);
    if (empty($this->cookies[$domain])) {
      unset($this->cookies[$domain]);
    }
  }
}