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

Breadcrumb

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

function Cookie::withRaw

Creates a cookie copy that uses no url encoding.

File

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

Class

Cookie
Represents a cookie.

Namespace

Symfony\Component\HttpFoundation

Code

public function withRaw(bool $raw = true) : static {
    if ($raw && false !== strpbrk($this->name, self::RESERVED_CHARS_LIST)) {
        throw new \InvalidArgumentException(\sprintf('The cookie name "%s" contains invalid characters.', $this->name));
    }
    $cookie = clone $this;
    $cookie->raw = $raw;
    return $cookie;
}

API Navigation

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