\Zend_Session_Namespace
Zend_Session_Namespace
- Copyright: Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Session_Namespace
extends Zend_Session_Abstract
implements
IteratorAggregate
{
- // constants
- const SINGLE_INSTANCE = true;
- // Inherited constants from Zend_Session_Abstract
- const _THROW_NOT_WRITABLE_MSG = 'Zend_Session is currently marked as read-only.';
- const _THROW_NOT_READABLE_MSG = 'Zend_Session is not marked as readable.';
- // members
- protected string $_namespace = "Default";
- protected static array $_namespaceLocks = ;
- protected static array $_singleInstances = ;
- // Inherited members from Zend_Session_Abstract
- protected static bool $_writable;
- protected static bool $_readable;
- protected static array $_expiringData;
- // methods
- public static null resetSingleInstance()
- public void __construct()
- public ArrayObject getIterator()
- public void lock()
- public void unlock()
- public static void unlockAll()
- public bool isLocked()
- public true unsetAll()
- public mixed __get()
- public true __set()
- public void apply()
- public void applySet()
- public bool __isset()
- public true __unset()
- public void setExpirationSeconds()
- public void setExpirationHops()
- public string getNamespace()
- // Inherited methods from Zend_Session_Abstract
- protected static bool _namespaceIsset()
- protected static void _namespaceUnset()
- protected static mixed _namespaceGet()
- protected static mixed _namespaceGetAll()
Hierarchy
Constants
Name | Value |
---|---|
SINGLE_INSTANCE | true |
_THROW_NOT_WRITABLE_MSG | 'Zend_Session is currently marked as read-only.' |
_THROW_NOT_READABLE_MSG | 'Zend_Session is not marked as readable.' |
Members
protected
- $_expiringData
—
array
Since expiring data is handled at startup to avoid __destruct difficulties, the data that will be expiring at end of this request is held here - $_namespace
—
string
Namespace - which namespace this instance of zend-session is saving-to/getting-from - $_namespaceLocks
—
array
Namespace locking mechanism - $_readable
—
bool
Whether or not session permits reading (reading data in $_SESSION[]) - $_singleInstances
—
array
Single instance namespace array to ensure data security. - $_writable
—
bool
Whether or not session permits writing (modification of $_SESSION[])
Methods
public
- __construct() — __construct() - Returns an instance object bound to a particular, isolated section of the session, identified by $namespace name (defaulting to 'Default').
- __get() — __get() - method to get a variable in this object's current namespace
- __isset() — __isset() - determine if a variable in this object's namespace is set
- __set() — __set() - method to set a variable/value in this object's namespace
- __unset() — __unset() - unset a variable in this object's namespace.
- apply() — 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() — applySet() - enables applying user-selected function, and sets entire namespace to the result Result of $callback must be an array.
- 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
- resetSingleInstance() — resetSingleInstance()
- setExpirationHops() — setExpirationHops() - expire the namespace, or specific variables after a specified number of page hops
- setExpirationSeconds() — setExpirationSeconds() - expire the namespace, or specific variables after a specified number of seconds
- unlock() — unlock() - unmark a session/namespace to enable read & write
- unlockAll() — unlockAll() - unmark all session/namespaces to enable read & write
- unsetAll() — unsetAll() - unset all variables in this namespace
Inherited from Zend_Session_Abstract
protected
- _namespaceGet() — namespaceGet() - Get $name variable from $namespace, returning by reference.
- _namespaceGetAll() — namespaceGetAll() - Get an array containing $namespace, including expiring data.
- _namespaceIsset() — namespaceIsset() - check to see if a namespace or a variable within a namespace is set
- _namespaceUnset() — namespaceUnset() - unset a namespace or a variable within a namespace