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

Breadcrumb

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

function SetCookie::setHttpOnly

Set whether or not this is an HTTP only cookie.

Parameters

bool $httpOnly Set to true or false if this is HTTP only:

1 call to SetCookie::setHttpOnly()
SetCookie::__construct in vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

File

vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php, line 363

Class

SetCookie
Set-Cookie object

Namespace

GuzzleHttp\Cookie

Code

public function setHttpOnly($httpOnly) : void {
    if (!is_bool($httpOnly)) {
        trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__);
    }
    $this->data['HttpOnly'] = (bool) $httpOnly;
}

API Navigation

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