Generic storage class helps to manage global data.
category | Zend |
---|---|
package | Zend_Registry |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(array $array= array()
, integer $flags= parent::ARRAY_AS_PROPS
)
array
data array
integer
ArrayObject flags
_unsetInstance()
Primarily used in tearDown() in unit tests.
returns | void |
---|
get(string $index) : mixed
This method can be called from an object of type Zend_Registry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.
string
\Zend_Exception |
if no entry is registered for $index. |
---|
mixed
getInstance() : \Zend_Registry
\Zend_Registry
isRegistered(string $index) : boolean
string
boolean
offsetExists(string $index)
returns | mixed Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960). |
---|
string
set(string $index, mixed $value) : void
This method can be called from an object of type Zend_Registry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.
string
The location in the ArrayObject in which to store the value.
mixed
The object to store in the ArrayObject.
setClassName(string $registryClassName = 'Zend_Registry'
) : void
Does not affect the currently initialized instance, it only applies for the next time you instantiate.
string
\Zend_Exception |
if the registry is initialized or if the class name is not valid. |
---|
setInstance(\Zend_Registry $registry) : void
\Zend_Registry
An object instance of type Zend_Registry, or a subclass.
\Zend_Exception |
if registry is already initialized. |
---|
init() : void
$_registry : \Zend_Registry
null
$_registryClassName : string
'Zend_Registry'