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

Breadcrumb

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

function Cookie::withDomain

Creates a cookie copy with a new domain that the cookie is available to.

File

vendor/symfony/http-foundation/Cookie.php, line 130

Class

Cookie
Represents a cookie.

Namespace

Symfony\Component\HttpFoundation

Code

public function withDomain(?string $domain) : static {
    $cookie = clone $this;
    $cookie->domain = $domain;
    return $cookie;
}

API Navigation

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