Mage_Rss_Model_Session
extends Mage_Core_Model_Session_Abstract
in package
Maho
Table of Contents
Constants
- REGISTRY_KEY = 'symfony_session'
- SECURE_COOKIE_CHECK_KEY = '_secure_cookie_check'
- SESSION_ID_QUERY_PARAM = 'SID'
- VALIDATOR_HTTP_USER_AGENT_KEY = 'http_user_agent'
- VALIDATOR_HTTP_VIA_KEY = 'http_via'
- VALIDATOR_HTTP_X_FORVARDED_FOR_KEY = 'http_x_forwarded_for'
- VALIDATOR_KEY = '_session_validator_data'
- VALIDATOR_PASSWORD_CREATE_TIMESTAMP = 'password_create_timestamp'
- VALIDATOR_REMOTE_ADDR_KEY = 'remote_addr'
- XML_NODE_SESSION_SAVE = 'global/session_save'
- XML_NODE_SESSION_SAVE_PATH = 'global/session_save_path'
- XML_NODE_USET_AGENT_SKIP = 'global/session/validation/http_user_agent_skip'
- XML_PATH_COOKIE_DOMAIN = 'web/cookie/cookie_domain'
- XML_PATH_COOKIE_LIFETIME = 'web/cookie/cookie_lifetime'
- XML_PATH_COOKIE_PATH = 'web/cookie/cookie_path'
- XML_PATH_LOG_EXCEPTION_FILE = 'dev/log/exception_file'
- XML_PATH_USE_FRONTEND_SID = 'web/session/use_frontend_sid'
- XML_PATH_USE_HTTP_VIA = 'web/session/use_http_via'
- XML_PATH_USE_REMOTE_ADDR = 'web/session/use_remote_addr'
- XML_PATH_USE_USER_AGENT = 'web/session/use_http_user_agent'
- XML_PATH_USE_X_FORWARDED = 'web/session/use_http_x_forwarded_for'
Properties
- $_data : array<string|int, mixed>|null
- Object attributes
- $_dirty : array<string|int, mixed>
- $_encryptedSessionId : string
- Encrypted session id cache
- $_hasDataChanges : bool
- Data changes flag (true after setData|unsetData call)
- $_idFieldName : string
- Name of object id field
- $_isDeleted : bool
- Object delete flag
- $_oldFieldsMap : array<string|int, mixed>
- Map short fields names to its full names
- $_sessionHosts : array<string|int, mixed>
- Map of session enabled hosts
- $_skipSessionIdFlag : bool
- Skip session id flag
- $_syncFieldsMap : mixed
- Map of fields to sync to other fields upon changing their data
- $_underscoreCache : array<string|int, mixed>
- Setter/Getter underscore transformation cache
- $_urlHostCache : array<string|int, mixed>
- URL host cache
- $isValidated : bool
Methods
- __call() : mixed
- Set/Get attribute wrapper
- __construct() : mixed
- Constructor
- __get() : mixed
- Attribute getter (deprecated)
- __set() : mixed
- Attribute setter (deprecated)
- __toArray() : array<string|int, mixed>
- Convert object attributes to array
- addData() : $this
- Add data to the object.
- addError() : self
- Adding new error message
- addException() : self
- Not Mage exception handling
- addHost() : self
- Add hostname to session
- addMessage() : self
- Adding new message to message collection
- addMessages() : self
- Adding messages array to message collection
- addNotice() : self
- Adding new notice message
- addSuccess() : self
- Adding new success message
- addUniqueMessages() : $this
- Adds messages array to message collection, but doesn't add duplicates to it
- addWarning() : self
- Adding new warning message
- clear() : self
- Alias for unsetAll
- debug() : string|array<string|int, mixed>
- Present object data as string in debug mode
- flagDirty() : $this
- getAdmin() : Mage_Admin_Model_User
- getCookie() : Mage_Core_Model_Cookie
- Retrieve cookie object
- getCookieDomain() : string
- getCookieLifetime() : int
- getCookiePath() : string
- getCustomer() : Mage_Customer_Model_Customer
- getData() : mixed
- Additional get data with clear mode
- getDataByKey() : mixed
- Get object data by particular key
- getDataByPath() : mixed
- Get object data by path
- getDataSetDefault() : mixed
- Fast get data or set default if value is not available
- getDataUsingMethod() : mixed
- Get object data by key with calling getter method
- getEncryptedSessionId() : string
- Get encrypted session identifier.
- getErrorMessage() : string
- getId() : mixed
- Retrieve object id
- getIdFieldName() : string
- Retrieve name of object id field
- getMessages() : Mage_Core_Model_Message_Collection
- Retrieve messages from session
- getSessionHosts() : array<string|int, mixed>
- getSessionId() : false|string
- getSessionIdForHost() : string
- If session cookie is not applicable due to host or path mismatch - add session id to query
- getSessionIdQueryParam() : string
- getSessionName() : string
- getSessionSaveMethod() : string
- Retrieve session save method Default files
- getSessionSavePath() : string
- getSessionValidatorData() : array<string|int, mixed>
- getSkipEmptySessionCheck() : bool|null
- getSkipSessionIdFlag() : bool
- Retrieve session id skip flag
- getSuccessMessage() : string
- getValidateHttpUserAgentSkip() : array<string|int, mixed>
- Retrieve skip User Agent validation strings (Flash etc)
- getValidatorData() : array<string|int, mixed>
- Retrieve unique user data for validator
- hasData() : bool
- If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
- hasDataChanges() : bool
- Get data change status
- init() : self
- Init session with namespace
- isAdminLoggedIn() : bool
- isCustomerLoggedIn() : bool
- isDeleted() : bool
- Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
- isDirty() : bool
- isEmpty() : bool
- checks whether the object is empty
- isValidForHost() : bool
- Check if session is valid for given hostname
- isValidForPath() : bool
- Check if session is valid for given path
- offsetExists() : bool
- Implementation of ArrayAccess::offsetExists()
- offsetGet() : mixed
- Implementation of ArrayAccess::offsetGet()
- offsetSet() : void
- Implementation of ArrayAccess::offsetSet()
- offsetUnset() : void
- Implementation of ArrayAccess::offsetUnset()
- regenerateSessionId() : self
- renewSession() : self
- Renew session id and update session cookie
- serialize() : string
- serialize object attributes
- setAdmin() : $this
- setData() : $this
- Overwrite data in the object.
- setDataChanges() : $this
- Clears data changes status
- setDataUsingMethod() : $this
- Set object data with calling setter method
- setErrorMessage() : $this
- setId() : $this
- Set object id field value
- setIdFieldName() : $this
- set name of object id field
- setMessages() : $this
- setSessionCookie() : self
- setSessionHosts() : self
- setSessionId() : self
- Set custom session id
- setSessionName() : self
- setSkipEmptySessionCheck() : $this
- setSkipSessionIdFlag() : self
- Set skip flag if need skip generating of _GET session_id_key param
- setSuccessMessage() : $this
- setValidatorSessionRenewTimestamp() : void
- Update the session's last legitimate renewal time (call when customer password is updated to avoid being logged out)
- start() : self
- Configure and start session
- toArray() : array<string|int, mixed>
- Public wrapper for __toArray
- toJson() : string
- Public wrapper for __toJson
- toString() : string
- Public wrapper for __toString
- toXml() : string
- Public wrapper for __toXml
- unsErrorMessage() : $this
- unsetAll() : self
- Unset all data
- unsetData() : $this
- Unset data from the object.
- unsetOldData() : $this
- Unset old fields data from the object.
- unsSuccessMessage() : $this
- useSid() : bool
- Check whether SID can be used for session initialization Admin area will always have this feature enabled
- useValidateHttpUserAgent() : bool
- Use HTTP_USER_AGENT in validator key
- useValidateHttpVia() : bool
- Use HTTP_VIA in validator key
- useValidateHttpXForwardedFor() : bool
- Use HTTP_X_FORWARDED_FOR in validator key
- useValidateRemoteAddr() : bool
- Use REMOTE_ADDR in validator key
- useValidateSessionPasswordTimestamp() : bool
- Password creation timestamp must not be newer than last session renewal.
- validate() : self
- Validate session
- __toJson() : string
- Convert object attributes to JSON
- __toXml() : string
- Convert object attributes to XML
- _addFullNames() : mixed
- _camelize() : string
- _construct() : void
- Internal constructor not depended on params. Can be used for object initialization
- _getData() : mixed
- Get value from _data array without parse key
- _initOldFieldsMap() : mixed
- Inits mapping array of object's previously used fields to new fields.
- _prepareArray() : array<string|int, mixed>
- Set required array elements
- _prepareSyncFieldsMap() : $this
- Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
- _underscore() : string
- Converts field names for setters and getters
- _validate() : bool
- Validate data
Constants
REGISTRY_KEY
public
mixed
REGISTRY_KEY
= 'symfony_session'
SECURE_COOKIE_CHECK_KEY
public
mixed
SECURE_COOKIE_CHECK_KEY
= '_secure_cookie_check'
SESSION_ID_QUERY_PARAM
public
mixed
SESSION_ID_QUERY_PARAM
= 'SID'
VALIDATOR_HTTP_USER_AGENT_KEY
public
mixed
VALIDATOR_HTTP_USER_AGENT_KEY
= 'http_user_agent'
VALIDATOR_HTTP_VIA_KEY
public
mixed
VALIDATOR_HTTP_VIA_KEY
= 'http_via'
VALIDATOR_HTTP_X_FORVARDED_FOR_KEY
public
mixed
VALIDATOR_HTTP_X_FORVARDED_FOR_KEY
= 'http_x_forwarded_for'
VALIDATOR_KEY
public
mixed
VALIDATOR_KEY
= '_session_validator_data'
VALIDATOR_PASSWORD_CREATE_TIMESTAMP
public
mixed
VALIDATOR_PASSWORD_CREATE_TIMESTAMP
= 'password_create_timestamp'
VALIDATOR_REMOTE_ADDR_KEY
public
mixed
VALIDATOR_REMOTE_ADDR_KEY
= 'remote_addr'
XML_NODE_SESSION_SAVE
public
mixed
XML_NODE_SESSION_SAVE
= 'global/session_save'
XML_NODE_SESSION_SAVE_PATH
public
mixed
XML_NODE_SESSION_SAVE_PATH
= 'global/session_save_path'
XML_NODE_USET_AGENT_SKIP
public
mixed
XML_NODE_USET_AGENT_SKIP
= 'global/session/validation/http_user_agent_skip'
XML_PATH_COOKIE_DOMAIN
public
mixed
XML_PATH_COOKIE_DOMAIN
= 'web/cookie/cookie_domain'
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_LOG_EXCEPTION_FILE
public
mixed
XML_PATH_LOG_EXCEPTION_FILE
= 'dev/log/exception_file'
XML_PATH_USE_FRONTEND_SID
public
mixed
XML_PATH_USE_FRONTEND_SID
= 'web/session/use_frontend_sid'
XML_PATH_USE_HTTP_VIA
public
mixed
XML_PATH_USE_HTTP_VIA
= 'web/session/use_http_via'
XML_PATH_USE_REMOTE_ADDR
public
mixed
XML_PATH_USE_REMOTE_ADDR
= 'web/session/use_remote_addr'
XML_PATH_USE_USER_AGENT
public
mixed
XML_PATH_USE_USER_AGENT
= 'web/session/use_http_user_agent'
XML_PATH_USE_X_FORWARDED
public
mixed
XML_PATH_USE_X_FORWARDED
= 'web/session/use_http_x_forwarded_for'
Properties
$_data
Object attributes
protected
array<string|int, mixed>|null
$_data
= []
$_dirty
protected
array<string|int, mixed>
$_dirty
$_encryptedSessionId
Encrypted session id cache
protected
static string
$_encryptedSessionId
$_hasDataChanges
Data changes flag (true after setData|unsetData call)
protected
bool
$_hasDataChanges
= \false
$_idFieldName
Name of object id field
protected
string
$_idFieldName
= \null
$_isDeleted
Object delete flag
protected
bool
$_isDeleted
= \false
$_oldFieldsMap
Map short fields names to its full names
protected
array<string|int, mixed>
$_oldFieldsMap
= []
$_sessionHosts
Map of session enabled hosts
protected
array<string|int, mixed>
$_sessionHosts
= []
Tags
$_skipSessionIdFlag
Skip session id flag
protected
bool
$_skipSessionIdFlag
= \false
$_syncFieldsMap
Map of fields to sync to other fields upon changing their data
protected
mixed
$_syncFieldsMap
= []
$_underscoreCache
Setter/Getter underscore transformation cache
protected
static array<string|int, mixed>
$_underscoreCache
= []
$_urlHostCache
URL host cache
protected
static array<string|int, mixed>
$_urlHostCache
= []
$isValidated
protected
static bool
$isValidated
= \false
Flag true if session validator data has already been evaluated
Methods
__call()
Set/Get attribute wrapper
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
__construct()
Constructor
public
__construct() : mixed
By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes
__get()
Attribute getter (deprecated)
public
__get(string $var) : mixed
Parameters
- $var : string
__set()
Attribute setter (deprecated)
public
__set(string $var, mixed $value) : mixed
Parameters
- $var : string
- $value : mixed
__toArray()
Convert object attributes to array
public
__toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
Return values
array<string|int, mixed>addData()
Add data to the object.
public
addData(array<string|int, mixed> $arr) : $this
Retains previous data in the object.
Parameters
- $arr : array<string|int, mixed>
Return values
$thisaddError()
Adding new error message
public
addError(string $message) : self
Parameters
- $message : string
Return values
selfaddException()
Not Mage exception handling
public
addException(Exception $exception, string $alternativeText) : self
Parameters
- $exception : Exception
- $alternativeText : string
Return values
selfaddHost()
Add hostname to session
public
addHost(string|true $host) : self
Parameters
- $host : string|true
Return values
selfaddMessage()
Adding new message to message collection
public
addMessage(Mage_Core_Model_Message_Abstract $message) : self
Parameters
- $message : Mage_Core_Model_Message_Abstract
Return values
selfaddMessages()
Adding messages array to message collection
public
addMessages(array<string|int, mixed> $messages) : self
Parameters
- $messages : array<string|int, mixed>
Return values
selfaddNotice()
Adding new notice message
public
addNotice(string $message) : self
Parameters
- $message : string
Return values
selfaddSuccess()
Adding new success message
public
addSuccess(string $message) : self
Parameters
- $message : string
Return values
selfaddUniqueMessages()
Adds messages array to message collection, but doesn't add duplicates to it
public
addUniqueMessages(array<string|int, mixed>|string|Mage_Core_Model_Message_Abstract $messages) : $this
Parameters
- $messages : array<string|int, mixed>|string|Mage_Core_Model_Message_Abstract
Return values
$thisaddWarning()
Adding new warning message
public
addWarning(string $message) : self
Parameters
- $message : string
Return values
selfclear()
Alias for unsetAll
public
clear() : self
Return values
selfdebug()
Present object data as string in debug mode
public
debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
- $data : mixed = null
- $objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>flagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisgetAdmin()
public
getAdmin() : Mage_Admin_Model_User
Return values
Mage_Admin_Model_UsergetCookie()
Retrieve cookie object
public
getCookie() : Mage_Core_Model_Cookie
Return values
Mage_Core_Model_CookiegetCookieDomain()
public
getCookieDomain() : string
Return values
stringgetCookieLifetime()
public
getCookieLifetime() : int
Return values
intgetCookiePath()
public
getCookiePath() : string
Return values
stringgetCustomer()
public
getCustomer() : Mage_Customer_Model_Customer
Return values
Mage_Customer_Model_CustomergetData()
Additional get data with clear mode
public
getData([string $key = '' ][, mixed $index = null ]) : mixed
Parameters
- $key : string = ''
- $index : mixed = null
-
For compatibility with parent; when bool, acts as clear flag
Attributes
- #[Override]
getDataByKey()
Get object data by particular key
public
getDataByKey(string $key) : mixed
Parameters
- $key : string
getDataByPath()
Get object data by path
public
getDataByPath(string $path) : mixed
Method consider the path as chain of keys: a/b/c => ['a']['b']['c']
Parameters
- $path : string
getDataSetDefault()
Fast get data or set default if value is not available
public
getDataSetDefault(string $key, mixed $default) : mixed
Parameters
- $key : string
- $default : mixed
getDataUsingMethod()
Get object data by key with calling getter method
public
getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
- $key : string
- $args : mixed = null
getEncryptedSessionId()
Get encrypted session identifier.
public
getEncryptedSessionId() : string
No reason use crypt key for session id encryption, we can use session identifier as is.
Return values
stringgetErrorMessage()
public
getErrorMessage() : string
Return values
stringgetId()
Retrieve object id
public
getId() : mixed
getIdFieldName()
Retrieve name of object id field
public
getIdFieldName() : string
Return values
stringgetMessages()
Retrieve messages from session
public
getMessages([bool $clear = false ]) : Mage_Core_Model_Message_Collection
Parameters
- $clear : bool = false
Return values
Mage_Core_Model_Message_CollectiongetSessionHosts()
public
getSessionHosts() : array<string|int, mixed>
Return values
array<string|int, mixed>getSessionId()
public
getSessionId() : false|string
Return values
false|stringgetSessionIdForHost()
If session cookie is not applicable due to host or path mismatch - add session id to query
public
getSessionIdForHost(string $urlHost) : string
Parameters
- $urlHost : string
-
can be host or url
Return values
string —{session_id_key}={session_id_encrypted}
getSessionIdQueryParam()
public
getSessionIdQueryParam() : string
Return values
stringgetSessionName()
public
getSessionName() : string
Return values
stringgetSessionSaveMethod()
Retrieve session save method Default files
public
getSessionSaveMethod() : string
Return values
stringgetSessionSavePath()
public
getSessionSavePath() : string
Return values
stringgetSessionValidatorData()
public
getSessionValidatorData() : array<string|int, mixed>
Return values
array<string|int, mixed>getSkipEmptySessionCheck()
public
getSkipEmptySessionCheck() : bool|null
Return values
bool|nullgetSkipSessionIdFlag()
Retrieve session id skip flag
public
getSkipSessionIdFlag() : bool
Return values
boolgetSuccessMessage()
public
getSuccessMessage() : string
Return values
stringgetValidateHttpUserAgentSkip()
Retrieve skip User Agent validation strings (Flash etc)
public
getValidateHttpUserAgentSkip() : array<string|int, mixed>
Return values
array<string|int, mixed>getValidatorData()
Retrieve unique user data for validator
public
getValidatorData() : array<string|int, mixed>
Return values
array<string|int, mixed>hasData()
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
public
hasData([string $key = '' ]) : bool
Parameters
- $key : string = ''
Return values
boolhasDataChanges()
Get data change status
public
hasDataChanges() : bool
Return values
boolinit()
Init session with namespace
public
init(string $namespace[, string|null $sessionName = null ]) : self
Parameters
- $namespace : string
- $sessionName : string|null = null
Return values
selfisAdminLoggedIn()
public
isAdminLoggedIn() : bool
Return values
boolisCustomerLoggedIn()
public
isCustomerLoggedIn() : bool
Return values
boolisDeleted()
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
public
isDeleted([bool $isDeleted = null ]) : bool
Parameters
- $isDeleted : bool = null
Return values
boolisDirty()
public
isDirty([string $field = null ]) : bool
Parameters
- $field : string = null
Return values
boolisEmpty()
checks whether the object is empty
public
isEmpty() : bool
Return values
boolisValidForHost()
Check if session is valid for given hostname
public
isValidForHost(string $host) : bool
Parameters
- $host : string
Return values
boolisValidForPath()
Check if session is valid for given path
public
isValidForPath(string $path) : bool
Parameters
- $path : string
Return values
booloffsetExists()
Implementation of ArrayAccess::offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Attributes
- #[Override]
Return values
booloffsetGet()
Implementation of ArrayAccess::offsetGet()
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Tags
Attributes
- #[Override]
- #[ReturnTypeWillChange]
offsetSet()
Implementation of ArrayAccess::offsetSet()
public
offsetSet(string $offset, mixed $value) : void
Parameters
- $offset : string
- $value : mixed
Tags
Attributes
- #[Override]
offsetUnset()
Implementation of ArrayAccess::offsetUnset()
public
offsetUnset(string $offset) : void
Parameters
- $offset : string
Tags
Attributes
- #[Override]
regenerateSessionId()
public
regenerateSessionId() : self
Return values
selfrenewSession()
Renew session id and update session cookie
public
renewSession() : self
Return values
selfserialize()
serialize object attributes
public
serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
- $attributes : array<string|int, mixed> = []
- $valueSeparator : string = '='
- $fieldSeparator : string = ' '
- $quote : string = '"'
Return values
stringsetAdmin()
public
setAdmin(Mage_Admin_Model_User $value) : $this
Parameters
- $value : Mage_Admin_Model_User
Return values
$thissetData()
Overwrite data in the object.
public
setData(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this
$key can be string or array. If $key is string, the attribute value will be overwritten by $value
If $key is an array, it will overwrite all the data in the object.
Parameters
- $key : string|array<string|int, mixed>
- $value : mixed = null
Return values
$thissetDataChanges()
Clears data changes status
public
setDataChanges(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDataUsingMethod()
Set object data with calling setter method
public
setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
- $key : string
- $args : mixed = []
Return values
$thissetErrorMessage()
public
setErrorMessage(string $value) : $this
Parameters
- $value : string
Return values
$thissetId()
Set object id field value
public
setId(mixed $value) : $this
Parameters
- $value : mixed
Return values
$thissetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetMessages()
public
setMessages(Mage_Core_Model_Abstract|Mage_Core_Model_Message_Collection $value) : $this
Parameters
Return values
$thissetSessionCookie()
public
setSessionCookie() : self
Return values
selfsetSessionHosts()
public
setSessionHosts(array<string|int, mixed> $hosts) : self
Parameters
- $hosts : array<string|int, mixed>
Return values
selfsetSessionId()
Set custom session id
public
setSessionId([string|null $id = null ]) : self
Parameters
- $id : string|null = null
Return values
selfsetSessionName()
public
setSessionName(string $name) : self
Parameters
- $name : string
Return values
selfsetSkipEmptySessionCheck()
public
setSkipEmptySessionCheck(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thissetSkipSessionIdFlag()
Set skip flag if need skip generating of _GET session_id_key param
public
setSkipSessionIdFlag(bool $flag) : self
Parameters
- $flag : bool
Return values
selfsetSuccessMessage()
public
setSuccessMessage(string $value) : $this
Parameters
- $value : string
Return values
$thissetValidatorSessionRenewTimestamp()
Update the session's last legitimate renewal time (call when customer password is updated to avoid being logged out)
public
setValidatorSessionRenewTimestamp([int|null $timestamp = null ]) : void
Parameters
- $timestamp : int|null = null
start()
Configure and start session
public
start([string|null $sessionName = null ]) : self
Parameters
- $sessionName : string|null = null
Tags
Return values
selftoArray()
Public wrapper for __toArray
public
toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>toJson()
Public wrapper for __toJson
public
toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
stringtoString()
Public wrapper for __toString
public
toString([string $format = '' ]) : string
Will use $format as an template and substitute {{key}} for attributes
Parameters
- $format : string = ''
Return values
stringtoXml()
Public wrapper for __toXml
public
toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
- $rootName : string = 'item'
- $addOpenTag : bool = false
- $addCdata : bool = true
Return values
stringunsErrorMessage()
public
unsErrorMessage() : $this
Return values
$thisunsetAll()
Unset all data
public
unsetAll() : self
Return values
selfunsetData()
Unset data from the object.
public
unsetData([string $key = null ]) : $this
$key can be a string only. Array will be ignored.
Parameters
- $key : string = null
Return values
$thisunsetOldData()
Unset old fields data from the object.
public
unsetOldData([string $key = null ]) : $this
$key can be a string only. Array will be ignored.
Parameters
- $key : string = null
Return values
$thisunsSuccessMessage()
public
unsSuccessMessage() : $this
Return values
$thisuseSid()
Check whether SID can be used for session initialization Admin area will always have this feature enabled
public
useSid() : bool
Return values
booluseValidateHttpUserAgent()
Use HTTP_USER_AGENT in validator key
public
useValidateHttpUserAgent() : bool
Return values
booluseValidateHttpVia()
Use HTTP_VIA in validator key
public
useValidateHttpVia() : bool
Return values
booluseValidateHttpXForwardedFor()
Use HTTP_X_FORWARDED_FOR in validator key
public
useValidateHttpXForwardedFor() : bool
Return values
booluseValidateRemoteAddr()
Use REMOTE_ADDR in validator key
public
useValidateRemoteAddr() : bool
Return values
booluseValidateSessionPasswordTimestamp()
Password creation timestamp must not be newer than last session renewal.
public
useValidateSessionPasswordTimestamp() : bool
Classes that extend from this may turn that off if they need to not check this. Like some sort of API session that doesn't use passwords and so sessions shouldn't expire.
Return values
boolvalidate()
Validate session
public
validate() : self
Tags
Return values
self__toJson()
Convert object attributes to JSON
protected
__toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
Return values
string__toXml()
Convert object attributes to XML
protected
__toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
- $rootName : string = 'item'
-
name of the root element
- $addOpenTag : bool = false
- $addCdata : bool = true
Return values
string_addFullNames()
protected
_addFullNames() : mixed
_camelize()
protected
_camelize(string $name) : string
Parameters
- $name : string
Return values
string_construct()
Internal constructor not depended on params. Can be used for object initialization
protected
_construct() : void
_getData()
Get value from _data array without parse key
protected
_getData(string $key) : mixed
Parameters
- $key : string
_initOldFieldsMap()
Inits mapping array of object's previously used fields to new fields.
protected
_initOldFieldsMap() : mixed
Must be overloaded by descendants to set concrete fields map.
_prepareArray()
Set required array elements
protected
_prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
- $arr : array<string|int, mixed>
- $elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>_prepareSyncFieldsMap()
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
protected
_prepareSyncFieldsMap() : $this
Return values
$this_underscore()
Converts field names for setters and getters
protected
_underscore(string $name) : string
$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace
Parameters
- $name : string
Return values
string_validate()
Validate data
protected
_validate() : bool