public function Request::removeCookie

Remove a specific cookie value by name

Parameters

string $name Cookie to remove by name:

Return value

RequestInterface

Overrides RequestInterface::removeCookie

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php, line 603

Class

Request
HTTP request class to send requests

Namespace

Guzzle\Http\Message

Code

public function removeCookie($name) {
  if ($cookie = $this
    ->getHeader('Cookie')) {
    foreach ($cookie as $cookieValue) {
      if (strpos($cookieValue, $name . '=') === 0) {
        $cookie
          ->removeValue($cookieValue);
      }
    }
  }
  return $this;
}