Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CookieJarInterface.php

function CookieJarInterface::clear

Remove cookies currently held in the cookie jar.

Invoking this method without arguments will empty the whole cookie jar. If given a $domain argument only cookies belonging to that domain will be removed. If given a $domain and $path argument, cookies belonging to the specified path within that domain are removed. If given all three arguments, then the cookie with the specified name, path and domain is removed.

Parameters

string|null $domain Clears cookies matching a domain:

string|null $path Clears cookies matching a domain and path:

string|null $name Clears cookies matching a domain, path, and name:

1 method overrides CookieJarInterface::clear()
CookieJar::clear in vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
Remove cookies currently held in the cookie jar.

File

vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php, line 65

Class

CookieJarInterface
Stores HTTP cookies.

Namespace

GuzzleHttp\Cookie

Code

public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal