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

Breadcrumb

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

function Cookie::withSecure

Creates a cookie copy that only be transmitted over a secure HTTPS connection from the client.

File

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

Class

Cookie
Represents a cookie.

Namespace

Symfony\Component\HttpFoundation

Code

public function withSecure(bool $secure = true) : static {
    $cookie = clone $this;
    $cookie->secure = $secure;
    return $cookie;
}

API Navigation

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