Session/Namespace.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Session
- Since
- Preview Release 0.2
- Version
- $Id$
\Zend_Session_Namespace
- Implements
- Parent(s)
- \Zend_Session_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
string $_namespace = "Default"
"Default"
Details- Type
- string
array $_namespaceLocks = array()
array()
Details- Type
- array
Methods
__construct(string $namespace = 'Default', bool $singleInstance = false) : void
__construct() - Returns an instance object bound to a particular, isolated section of the session, identified by $namespace name (defaulting to 'Default').
Name | Type | Description |
---|---|---|
$namespace | string |
|
$singleInstance | bool |
|
__get(string $name) : mixed
__get() - method to get a variable in this object's current namespace
Name | Type | Description |
---|---|---|
$name | string |
|
Type | Description |
---|---|
mixed |
__isset(string $name) : bool
__isset() - determine if a variable in this object's namespace is set
Name | Type | Description |
---|---|---|
$name | string |
|
Type | Description |
---|---|
bool |
__set(string $name, mixed $value) : true
__set() - method to set a variable/value in this object's namespace
Name | Type | Description |
---|---|---|
$name | string |
|
$value | mixed |
|
Type | Description |
---|---|
true |
Exception | Description |
---|---|
\Zend_Session_Exception |
__unset(string $name) : true
__unset() - unset a variable in this object's namespace.
Name | Type | Description |
---|---|---|
$name | string |
|
Type | Description |
---|---|
true |
apply(string | array $callback) : void
apply() - enables applying user-selected function, such as array_merge() to the namespace Parameters following the $callback argument are passed to the callback function.
Name | Type | Description |
---|---|---|
$callback | string | array |
|
applySet(string | array $callback) : void
applySet() - enables applying user-selected function, and sets entire namespace to the result Result of $callback must be an array.
Name | Type | Description |
---|---|---|
$callback | string | array |
|
getIterator() : \ArrayObject
getIterator() - return an iteratable object for use in foreach and the like, this completes the IteratorAggregate interface
Type | Description |
---|---|
\ArrayObject | - iteratable container of the namespace contents |
isLocked() : bool
isLocked() - return lock status, true if, and only if, read-only
Type | Description |
---|---|
bool |
resetSingleInstance(string $namespaceName = null) : null
resetSingleInstance()
Name | Type | Description |
---|---|---|
$namespaceName | string |
Type | Description |
---|---|
null |
setExpirationHops(int $hops, mixed $variables = null, boolean $hopCountOnUsageOnly = false) : void
setExpirationHops() - expire the namespace, or specific variables after a specified number of page hops
Name | Type | Description |
---|---|---|
$hops | int |
|
$variables | mixed |
|
$hopCountOnUsageOnly | boolean |
|
Exception | Description |
---|---|
\Zend_Session_Exception |
setExpirationSeconds(int $seconds, mixed $variables = null) : void
setExpirationSeconds() - expire the namespace, or specific variables after a specified number of seconds
Name | Type | Description |
---|---|---|
$seconds | int |
|
$variables | mixed |
|
Exception | Description |
---|---|
\Zend_Session_Exception |