Definition at line 30 of file Registry.php.
◆ __construct()
__construct |
( |
|
$array = array() , |
|
|
|
$flags = parent::ARRAY_AS_PROPS |
|
) |
| |
Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object
- Parameters
-
array | $array | data array |
integer | $flags | ArrayObject flags |
Definition at line 193 of file Registry.php.
195 parent::__construct($array, $flags);
◆ _unsetInstance()
static _unsetInstance |
( |
| ) |
|
|
static |
Unset the default registry instance. Primarily used in tearDown() in unit tests.
- Returns
- void
Definition at line 125 of file Registry.php.
127 self::$_registry =
null;
◆ get()
getter method, basically same as offsetGet().
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.
- Parameters
-
string | $index | - get the value associated with $index |
- Returns
- mixed
- Exceptions
-
Definition at line 141 of file Registry.php.
145 if (!$instance->offsetExists(
$index)) {
146 #require_once 'Zend/Exception.php'; 147 throw new Zend_Exception(
"No entry is registered for key '$index'");
150 return $instance->offsetGet(
$index);
◆ getInstance()
Retrieves the default registry instance.
- Returns
- Zend_Registry
Definition at line 49 of file Registry.php.
51 if (self::$_registry ===
null) {
55 return self::$_registry;
◆ init()
Initialize the default registry instance.
- Returns
- void
Definition at line 82 of file Registry.php.
static setInstance(Zend_Registry $registry)
◆ isRegistered()
static isRegistered |
( |
|
$index | ) |
|
|
static |
Returns TRUE if the $index is a named value in the registry, or FALSE if $index was not found in the registry.
- Parameters
-
- Returns
- boolean
Definition at line 178 of file Registry.php.
180 if (self::$_registry ===
null) {
183 return self::$_registry->offsetExists(
$index);
◆ offsetExists()
◆ set()
static set |
( |
|
$index, |
|
|
|
$value |
|
) |
| |
|
static |
setter method, basically same as offsetSet().
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.
- Parameters
-
string | $index | The location in the ArrayObject in which to store the value. |
mixed | $value | The object to store in the ArrayObject. |
- Returns
- void
Definition at line 165 of file Registry.php.
◆ setClassName()
Set the class name to use for the default registry instance. Does not affect the currently initialized instance, it only applies for the next time you instantiate.
- Parameters
-
- Returns
- void
- Exceptions
-
Zend_Exception | if the registry is initialized or if the class name is not valid. |
- See also
- Zend_Loader
Definition at line 97 of file Registry.php.
99 if (self::$_registry !==
null) {
100 #require_once 'Zend/Exception.php'; 104 if (!is_string($registryClassName)) {
105 #require_once 'Zend/Exception.php'; 113 #require_once 'Zend/Loader.php'; 117 self::$_registryClassName = $registryClassName;
static loadClass($class, $dirs=null)
◆ setInstance()
Set the default registry instance to a specified instance.
- Parameters
-
- Returns
- void
- Exceptions
-
Definition at line 66 of file Registry.php.
68 if (self::$_registry !==
null) {
69 #require_once 'Zend/Exception.php';
static setClassName($registryClassName='Zend_Registry')
The documentation for this class was generated from the following file: