Core_Cookie
in package
Cookie
Tags
Table of Contents
Methods
- chromiumBased() : bool
- Determine if a browser is Chrome (or Chromium) based.
- incompatibleChromiumBasedVersion() : bool
- Determine if a user agent matches a particular version of Chromium
- incompatibleUCBrowser() : bool
- Determine if a user agent matches a particular version of UCBrowser
- isSameSiteIncompatible() : bool
- SameSite=None: Known Incompatible Clients
- macOsXVersionCompare() : bool
- Determine if a user agent matches a particular version of Mac OS X
- safari() : bool
- Determine if a user agent matches a Safari
- sendSameSite() : bool
- SameSite=None: Known Incompatible Clients
- set() : bool
- Send a cookie
Methods
chromiumBased()
Determine if a browser is Chrome (or Chromium) based.
public
static chromiumBased(string $userAgent) : bool
Parameters
- $userAgent : string
Return values
boolincompatibleChromiumBasedVersion()
Determine if a user agent matches a particular version of Chromium
public
static incompatibleChromiumBasedVersion(string $userAgent, mixed $min, mixed $max) : bool
Parameters
- $userAgent : string
- $min : mixed
- $max : mixed
Return values
boolincompatibleUCBrowser()
Determine if a user agent matches a particular version of UCBrowser
public
static incompatibleUCBrowser(string $userAgent, mixed $max) : bool
Parameters
- $userAgent : string
- $max : mixed
Return values
boolisSameSiteIncompatible()
SameSite=None: Known Incompatible Clients
public
static isSameSiteIncompatible(string $userAgent) : bool
Parameters
- $userAgent : string
Return values
boolmacOsXVersionCompare()
Determine if a user agent matches a particular version of Mac OS X
public
static macOsXVersionCompare(string $userAgent, mixed $majorVerison, mixed $minorVerison) : bool
Parameters
- $userAgent : string
- $majorVerison : mixed
- $minorVerison : mixed
Return values
boolsafari()
Determine if a user agent matches a Safari
public
static safari(string $userAgent) : bool
Parameters
- $userAgent : string
Return values
boolsendSameSite()
SameSite=None: Known Incompatible Clients
public
static sendSameSite(string $samesite[, string $userAgent = NULL ]) : bool
Parameters
- $samesite : string
- $userAgent : string = NULL
Return values
boolset()
Send a cookie
public
static set(string $name[, string $value = '' ][, array<string|int, mixed> $options = array() ]) : bool
Parameters
- $name : string
-
The name of the cookie.
- $value : string = ''
-
The value of the cookie. Default ''
- $options : array<string|int, mixed> = array()
-
array('expires' => time() + 3600, 'path' => '/', 'domain' => '', 'secure' => FALSE, 'httponly' => FALSE, 'samesite' => 'Lax')