CryptoCookie extends Cookie
Class CryptoCookie Declares the class for working with cookies which values are encrypted.
Table of Contents
Constants
- SAME_SITE_LAX = 'Lax'
- SAME_SITE_NONE = 'None'
- SAME_SITE_STRICT = 'Strict'
- SPREAD_DOMAIN = 2
- SPREAD_SITES = 1
Methods
- __construct() : mixed
- Cookie constructor.
- copyAttributesTo() : void
- Copies attributes from another cookie to this one.
- getCookieDomain() : string
- Returns the domain from the sites settings to use with cookies.
- getDomain() : string|null
- getExpires() : int
- getHttpOnly() : bool
- getName() : string
- getOriginalName() : string
- getPath() : string
- getSameSite() : string|null
- getSecure() : bool
- getSpread() : mixed
- getValue() : string|null
- normalizeName() : string
- Normalizes a name for a cookie.
- setDomain() : self
- setExpires() : self
- setHttpOnly() : self
- setName() : self
- setPath() : self
- setSameSite() : self
- setSecure() : self
- setSpread() : mixed
- setValue() : self
Constants
SAME_SITE_LAX
public
mixed
SAME_SITE_LAX
= 'Lax'
SAME_SITE_NONE
public
mixed
SAME_SITE_NONE
= 'None'
SAME_SITE_STRICT
public
mixed
SAME_SITE_STRICT
= 'Strict'
SPREAD_DOMAIN
public
mixed
SPREAD_DOMAIN
= 2
SPREAD_SITES
public
mixed
SPREAD_SITES
= 1
Methods
__construct()
Cookie constructor.
public
__construct(string $name, string|null $value[, int $expires = null ][, bool $addPrefix = true ]) : mixed
Parameters
- $name : string
-
The cooke name
- $value : string|null
-
The cooke value
- $expires : int = null
-
Timestamp
- $addPrefix : bool = true
-
Name prefix, usually BITRIX_SM_
copyAttributesTo()
Copies attributes from another cookie to this one.
public
copyAttributesTo(Cookie $cookie) : void
Parameters
- $cookie : Cookie
-
Cookie to copy attributes from.
getCookieDomain()
Returns the domain from the sites settings to use with cookies.
public
static getCookieDomain() : string
Tags
Return values
stringgetDomain()
public
getDomain() : string|null
Return values
string|nullgetExpires()
public
getExpires() : int
Return values
intgetHttpOnly()
public
getHttpOnly() : bool
Return values
boolgetName()
public
getName() : string
Return values
stringgetOriginalName()
public
getOriginalName() : string
Return values
stringgetPath()
public
getPath() : string
Return values
stringgetSameSite()
public
getSameSite() : string|null
Return values
string|nullgetSecure()
public
getSecure() : bool
Return values
boolgetSpread()
public
getSpread() : mixed
getValue()
public
getValue() : string|null
Return values
string|nullnormalizeName()
Normalizes a name for a cookie.
public
static normalizeName(string $name) : string
Parameters
- $name : string
Return values
stringsetDomain()
public
setDomain(string $domain) : self
Parameters
- $domain : string
Return values
selfsetExpires()
public
setExpires(int $expires) : self
Parameters
- $expires : int
Return values
selfsetHttpOnly()
public
setHttpOnly(bool $httpOnly) : self
Parameters
- $httpOnly : bool
Return values
selfsetName()
public
setName(string $name) : self
Parameters
- $name : string
Return values
selfsetPath()
public
setPath(string $path) : self
Parameters
- $path : string
Return values
selfsetSameSite()
public
setSameSite(string|null $sameSite) : self
Parameters
- $sameSite : string|null
Return values
selfsetSecure()
public
setSecure(bool $secure) : self
Parameters
- $secure : bool
Return values
selfsetSpread()
public
setSpread(mixed $spread) : mixed
Parameters
- $spread : mixed
setValue()
public
setValue(string|null $value) : self
Parameters
- $value : string|null