Bitrix API

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
throws
SqlQueryException
throws
SystemException
Return values
string

getDomain()

public getDomain() : string|null
Return values
string|null

getExpires()

public getExpires() : int
Return values
int

getHttpOnly()

public getHttpOnly() : bool
Return values
bool

getName()

public getName() : string
Return values
string

getOriginalName()

public getOriginalName() : string
Return values
string

getPath()

public getPath() : string
Return values
string

getSameSite()

public getSameSite() : string|null
Return values
string|null

getSecure()

public getSecure() : bool
Return values
bool

getSpread()

public getSpread() : mixed

getValue()

public getValue() : string|null
Return values
string|null

normalizeName()

Normalizes a name for a cookie.

public static normalizeName(string $name) : string
Parameters
$name : string
Return values
string

setDomain()

public setDomain(string $domain) : self
Parameters
$domain : string
Return values
self

setExpires()

public setExpires(int $expires) : self
Parameters
$expires : int
Return values
self

setHttpOnly()

public setHttpOnly(bool $httpOnly) : self
Parameters
$httpOnly : bool
Return values
self

setName()

public setName(string $name) : self
Parameters
$name : string
Return values
self

setPath()

public setPath(string $path) : self
Parameters
$path : string
Return values
self

setSameSite()

public setSameSite(string|null $sameSite) : self
Parameters
$sameSite : string|null
Return values
self

setSecure()

public setSecure(bool $secure) : self
Parameters
$secure : bool
Return values
self

setSpread()

public setSpread(mixed $spread) : mixed
Parameters
$spread : mixed

setValue()

public setValue(string|null $value) : self
Parameters
$value : string|null
Return values
self

        
On this page

Search results