MediaWiki REL1_34
Wikimedia\Http\SetCookieCompat Class Reference

Public Member Functions

 setCookieEmulated ( $urlEncode, $name, $value, $options=[])
 Temporary emulation for setcookie() with a SameSite option.
 
 setCookieInternal ( $urlEncode, $name, $value, $options=[])
 

Static Public Member Functions

static setcookie ( $name, $value, $options=[])
 Temporary emulation for setcookie() with a SameSite option.
 
static setrawcookie ( $name, $value, $options=[])
 Temporary emulation for setrawcookie() with a SameSite option.
 

Protected Member Functions

 error ( $message)
 
 header ( $header)
 
 headers_sent ()
 
 time ()
 

Detailed Description

Definition at line 9 of file SetCookieCompat.php.

Member Function Documentation

◆ error()

Wikimedia\Http\SetCookieCompat::error (   $message)
protected

◆ header()

Wikimedia\Http\SetCookieCompat::header (   $header)
protected

◆ headers_sent()

Wikimedia\Http\SetCookieCompat::headers_sent ( )
protected

◆ setcookie()

static Wikimedia\Http\SetCookieCompat::setcookie (   $name,
  $value,
  $options = [] 
)
static

Temporary emulation for setcookie() with a SameSite option.

Once MediaWiki requires PHP 7.3, this can be replaced with a setcookie() call in the caller.

Parameters
string$nameThe full cookie name
string$valueThe cookie value
array$optionsThe options as passed to setcookie() in PHP 7.3+
Returns
bool

Definition at line 21 of file SetCookieCompat.php.

Referenced by Wikimedia\Http\SetCookieCompat\setCookieInternal().

◆ setCookieEmulated()

Wikimedia\Http\SetCookieCompat::setCookieEmulated (   $urlEncode,
  $name,
  $value,
  $options = [] 
)

Temporary emulation for setcookie() with a SameSite option.

Once MediaWiki requires PHP 7.3, this can be replaced with a setcookie() call in the caller.

Definition at line 101 of file SetCookieCompat.php.

References $path, Wikimedia\Http\SetCookieCompat\error(), Wikimedia\Http\SetCookieCompat\header(), Wikimedia\Http\SetCookieCompat\headers_sent(), and Wikimedia\Http\SetCookieCompat\time().

Referenced by Wikimedia\Http\SetCookieCompat\setCookieInternal().

◆ setCookieInternal()

Wikimedia\Http\SetCookieCompat::setCookieInternal (   $urlEncode,
  $name,
  $value,
  $options = [] 
)

◆ setrawcookie()

static Wikimedia\Http\SetCookieCompat::setrawcookie (   $name,
  $value,
  $options = [] 
)
static

Temporary emulation for setrawcookie() with a SameSite option.

Once MediaWiki requires PHP 7.3, this can be replaced with a setrawcookie() call in the caller.

Parameters
string$nameThe full cookie name
string$valueThe cookie value
array$optionsThe options as passed to setrawcookie() in PHP 7.3+
Returns
bool

Definition at line 36 of file SetCookieCompat.php.

Referenced by Wikimedia\Http\SetCookieCompat\setCookieInternal().

◆ time()

Wikimedia\Http\SetCookieCompat::time ( )
protected

The documentation for this class was generated from the following file: