Zend Framework
1.12
|
Public Member Functions | |
__construct ($namespace= 'Default', $singleInstance=false) | |
__construct() - Returns an instance object bound to a particular, isolated section of the session, identified by $namespace name (defaulting to 'Default'). | |
getIterator () | |
getIterator() - return an iteratable object for use in foreach and the like, this completes the IteratorAggregate interface | |
lock () | |
lock() - mark a session/namespace as readonly | |
unlock () | |
unlock() - unmark a session/namespace to enable read & write | |
isLocked () | |
isLocked() - return lock status, true if, and only if, read-only | |
unsetAll () | |
unsetAll() - unset all variables in this namespace | |
& | __get ($name) |
__get() - method to get a variable in this object's current namespace | |
__set ($name, $value) | |
__set() - method to set a variable/value in this object's namespace | |
apply ($callback) | |
apply() - enables applying user-selected function, such as array_merge() to the namespace Parameters following the $callback argument are passed to the callback function. | |
applySet ($callback) | |
applySet() - enables applying user-selected function, and sets entire namespace to the result Result of $callback must be an array. | |
__isset ($name) | |
__isset() - determine if a variable in this object's namespace is set | |
__unset ($name) | |
__unset() - unset a variable in this object's namespace. | |
setExpirationSeconds ($seconds, $variables=null) | |
setExpirationSeconds() - expire the namespace, or specific variables after a specified number of seconds | |
setExpirationHops ($hops, $variables=null, $hopCountOnUsageOnly=false) | |
setExpirationHops() - expire the namespace, or specific variables after a specified number of page hops | |
getNamespace () | |
Returns the namespace name. | |
Static Public Member Functions | |
static | resetSingleInstance ($namespaceName=null) |
resetSingleInstance() | |
static | unlockAll () |
unlockAll() - unmark all session/namespaces to enable read & write | |
Public Attributes | |
const | SINGLE_INSTANCE = true |
used as option to constructor to prevent additional instances to the same namespace | |
![]() | |
const | _THROW_NOT_WRITABLE_MSG = 'Zend_Session is currently marked as read-only.' |
Error message thrown when an action requires modification, but current Zend_Session has been marked as read-only. | |
const | _THROW_NOT_READABLE_MSG = 'Zend_Session is not marked as readable.' |
Error message thrown when an action requires reading session data, but current Zend_Session is not marked as readable. | |
Protected Attributes | |
$_namespace = "Default" | |
Static Protected Attributes | |
static | $_namespaceLocks = array() |
static | $_singleInstances = array() |
![]() | |
static | $_writable = false |
static | $_readable = false |
static | $_expiringData = array() |
Additional Inherited Members | |
![]() | |
static | _namespaceIsset ($namespace, $name=null) |
namespaceIsset() - check to see if a namespace or a variable within a namespace is set | |
static | _namespaceUnset ($namespace, $name=null) |
namespaceUnset() - unset a namespace or a variable within a namespace | |
static & | _namespaceGet ($namespace, $name=null) |
namespaceGet() - Get $name variable from $namespace, returning by reference. | |
static | _namespaceGetAll ($namespace) |
namespaceGetAll() - Get an array containing $namespace, including expiring data. | |
__construct | ( | $namespace = 'Default' , |
|
$singleInstance = false |
|||
) |
__construct() - Returns an instance object bound to a particular, isolated section of the session, identified by $namespace name (defaulting to 'Default').
The optional argument $singleInstance will prevent construction of additional instance objects acting as accessors to this $namespace.
string | $namespace | - programmatic name of the requested namespace |
bool | $singleInstance | - prevent creation of additional accessor instance objects for this namespace |
& __get | ( | $name | ) |
__get() - method to get a variable in this object's current namespace
string | $name | - programmatic name of a key, in a <key,value> pair in the current namespace |
__isset | ( | $name | ) |
__isset() - determine if a variable in this object's namespace is set
string | $name | - programmatic name of a key, in a <key,value> pair in the current namespace |
__set | ( | $name, | |
$value | |||
) |
__set() - method to set a variable/value in this object's namespace
string | $name | - programmatic name of a key, in a <key,value> pair in the current namespace |
mixed | $value | - value in the <key,value> pair to assign to the $name key |
Zend_Session_Exception |
__unset | ( | $name | ) |
__unset() - unset a variable in this object's namespace.
string | $name | - programmatic name of a key, in a <key,value> pair in the current namespace |
apply | ( | $callback | ) |
apply() - enables applying user-selected function, such as array_merge() to the namespace Parameters following the $callback argument are passed to the callback function.
Caveat: ignores members expiring now.
Example: $namespace->apply('array_merge', array('tree' => 'apple', 'fruit' => 'peach'), array('flower' => 'rose')); $namespace->apply('count');
string | array | $callback | - callback function |
applySet | ( | $callback | ) |
applySet() - enables applying user-selected function, and sets entire namespace to the result Result of $callback must be an array.
Parameters following the $callback argument are passed to the callback function. Caveat: ignores members expiring now.
Example: $namespace->applySet('array_merge', array('tree' => 'apple', 'fruit' => 'peach'), array('flower' => 'rose'));
string | array | $callback | - callback function |
getIterator | ( | ) |
getIterator() - return an iteratable object for use in foreach and the like, this completes the IteratorAggregate interface
getNamespace | ( | ) |
Returns the namespace name.
isLocked | ( | ) |
isLocked() - return lock status, true if, and only if, read-only
lock | ( | ) |
lock() - mark a session/namespace as readonly
|
static |
setExpirationHops | ( | $hops, | |
$variables = null , |
|||
$hopCountOnUsageOnly = false |
|||
) |
setExpirationHops() - expire the namespace, or specific variables after a specified number of page hops
int | $hops | - how many "hops" (number of subsequent requests) before expiring |
mixed | $variables | - OPTIONAL list of variables to expire (defaults to all) |
boolean | $hopCountOnUsageOnly | - OPTIONAL if set, only count a hop/request if this namespace is used |
Zend_Session_Exception |
setExpirationSeconds | ( | $seconds, | |
$variables = null |
|||
) |
setExpirationSeconds() - expire the namespace, or specific variables after a specified number of seconds
int | $seconds | - expires in this many seconds |
mixed | $variables | - OPTIONAL list of variables to expire (defaults to all) |
Zend_Session_Exception |
unlock | ( | ) |
unlock() - unmark a session/namespace to enable read & write
|
static |
unlockAll() - unmark all session/namespaces to enable read & write
unsetAll | ( | ) |
unsetAll() - unset all variables in this namespace
|
protected |
|
staticprotected |
|
staticprotected |
const SINGLE_INSTANCE = true |
used as option to constructor to prevent additional instances to the same namespace