Mage_Core_Model_Cookie
in package
Table of Contents
Constants
- DEFAULT_COOKIE_LIFETIME : mixed = 60 * 60 * 24 * 365
- XML_PATH_COOKIE_DOMAIN : mixed = 'web/cookie/cookie_domain'
- XML_PATH_COOKIE_HTTPONLY : mixed = 'web/cookie/cookie_httponly'
- XML_PATH_COOKIE_LIFETIME : mixed = 'web/cookie/cookie_lifetime'
- XML_PATH_COOKIE_PATH : mixed = 'web/cookie/cookie_path'
- XML_PATH_COOKIE_SAMESITE : mixed = 'web/cookie/cookie_samesite'
Properties
- $_lifetime : mixed
- $_store : Mage_Core_Model_Store|null
- Store object
Methods
- delete() : $this
- Delete cookie
- get() : mixed
- Retrieve cookie or false if not exists
- getConfigDomain() : string
- Retrieve Config Domain for cookie
- getDomain() : string
- Retrieve Domain for cookie
- getHttponly() : bool|null
- Retrieve use HTTP only flag
- getLifetime() : int
- Retrieve cookie lifetime
- getPath() : string
- Retrieve Path for cookie
- getSameSite() : string
- Retrieve use SameSite
- getStore() : Mage_Core_Model_Store
- Retrieve Store object
- isSecure() : bool
- Retrieve use secure cookie
- renew() : $this
- Postpone cookie expiration time if cookie value defined
- set() : $this
- Set cookie
- setLifetime() : $this
- Set cookie lifetime
- setStore() : $this
- Set Store object
- _getRequest() : Mage_Core_Controller_Request_Http
- Retrieve Request object
- _getResponse() : Mage_Core_Controller_Response_Http
- Retrieve Response object
Constants
DEFAULT_COOKIE_LIFETIME
public
mixed
DEFAULT_COOKIE_LIFETIME
= 60 * 60 * 24 * 365
XML_PATH_COOKIE_DOMAIN
public
mixed
XML_PATH_COOKIE_DOMAIN
= 'web/cookie/cookie_domain'
XML_PATH_COOKIE_HTTPONLY
public
mixed
XML_PATH_COOKIE_HTTPONLY
= 'web/cookie/cookie_httponly'
XML_PATH_COOKIE_LIFETIME
public
mixed
XML_PATH_COOKIE_LIFETIME
= 'web/cookie/cookie_lifetime'
XML_PATH_COOKIE_PATH
public
mixed
XML_PATH_COOKIE_PATH
= 'web/cookie/cookie_path'
XML_PATH_COOKIE_SAMESITE
public
mixed
XML_PATH_COOKIE_SAMESITE
= 'web/cookie/cookie_samesite'
Properties
$_lifetime
protected
mixed
$_lifetime
$_store
Store object
protected
Mage_Core_Model_Store|null
$_store
Methods
delete()
Delete cookie
public
delete(string $name[, string $path = null ][, string $domain = null ][, int|bool $secure = null ][, int|bool $httponly = null ][, string $sameSite = null ]) : $this
Parameters
- $name : string
- $path : string = null
- $domain : string = null
- $secure : int|bool = null
- $httponly : int|bool = null
- $sameSite : string = null
Return values
$thisget()
Retrieve cookie or false if not exists
public
get([string $name = null ]) : mixed
Parameters
- $name : string = null
-
The cookie name
getConfigDomain()
Retrieve Config Domain for cookie
public
getConfigDomain() : string
Return values
stringgetDomain()
Retrieve Domain for cookie
public
getDomain() : string
Return values
stringgetHttponly()
Retrieve use HTTP only flag
public
getHttponly() : bool|null
Return values
bool|nullgetLifetime()
Retrieve cookie lifetime
public
getLifetime() : int
Return values
intgetPath()
Retrieve Path for cookie
public
getPath() : string
Return values
stringgetSameSite()
Retrieve use SameSite
public
getSameSite() : string
Return values
stringgetStore()
Retrieve Store object
public
getStore() : Mage_Core_Model_Store
Return values
Mage_Core_Model_StoreisSecure()
Retrieve use secure cookie
public
isSecure() : bool
Return values
boolrenew()
Postpone cookie expiration time if cookie value defined
public
renew(string $name[, int $period = null ][, string $path = null ][, string $domain = null ][, int|bool $secure = null ][, bool $httponly = null ][, string $sameSite = null ]) : $this
Parameters
- $name : string
-
The cookie name
- $period : int = null
-
Lifetime period
- $path : string = null
- $domain : string = null
- $secure : int|bool = null
- $httponly : bool = null
- $sameSite : string = null
Return values
$thisset()
Set cookie
public
set(string $name, string $value[, int|bool $period = null ][, string $path = null ][, string $domain = null ][, int|bool $secure = null ][, bool $httponly = null ][, string $sameSite = null ]) : $this
Parameters
- $name : string
-
The cookie name
- $value : string
-
The cookie value
- $period : int|bool = null
-
Lifetime period
- $path : string = null
- $domain : string = null
- $secure : int|bool = null
- $httponly : bool = null
- $sameSite : string = null
Return values
$thissetLifetime()
Set cookie lifetime
public
setLifetime(int $lifetime) : $this
Parameters
- $lifetime : int
Return values
$thissetStore()
Set Store object
public
setStore(bool|int|Mage_Core_Model_Store|null|string $store) : $this
Parameters
- $store : bool|int|Mage_Core_Model_Store|null|string
Return values
$this_getRequest()
Retrieve Request object
protected
_getRequest() : Mage_Core_Controller_Request_Http
Return values
Mage_Core_Controller_Request_Http_getResponse()
Retrieve Response object
protected
_getResponse() : Mage_Core_Controller_Response_Http