Public Member Functions | Static Public Member Functions | Static Protected Member Functions

Zend_Registry Class Reference

Public Member Functions

 __construct ($array=array(), $flags=parent::ARRAY_AS_PROPS)
 offsetExists ($index)

Static Public Member Functions

static getInstance ()
static setInstance (Zend_Registry $registry)
static setClassName ($registryClassName= 'Zend_Registry')
static _unsetInstance ()
static get ($index)
static set ($index, $value)
static isRegistered ($index)

Static Protected Member Functions

static init ()

Detailed Description

Definition at line 30 of file Registry.php.


Constructor & Destructor Documentation

__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$arraydata array
integer$flagsArrayObject flags

Definition at line 193 of file Registry.php.


Member Function Documentation

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.

static get ( index ) [static]

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:
Zend_Exceptionif no entry is registerd for $index.

Definition at line 141 of file Registry.php.

static getInstance (  ) [static]

Retrieves the default registry instance.

Returns:
Zend_Registry

Definition at line 49 of file Registry.php.

static init (  ) [static, protected]

Initialize the default registry instance.

Returns:
void

Definition at line 82 of file Registry.php.

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:
string$index
Returns:
boolean

Definition at line 178 of file Registry.php.

offsetExists ( index )
Parameters:
string$index
Returns:
mixed

Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960).

Definition at line 204 of file Registry.php.

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$indexThe location in the ArrayObject in which to store the value.
mixed$valueThe object to store in the ArrayObject.
Returns:
void

Definition at line 165 of file Registry.php.

static setClassName ( registryClassName = 'Zend_Registry' ) [static]

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:
string$registryClassName
Returns:
void
Exceptions:
Zend_Exceptionif the registry is initialized or if the class name is not valid.

See also:
Zend_Loader

Definition at line 97 of file Registry.php.

static setInstance ( Zend_Registry registry ) [static]

Set the default registry instance to a specified instance.

Parameters:
Zend_Registry$registryAn object instance of type Zend_Registry, or a subclass.
Returns:
void
Exceptions:
Zend_Exceptionif registry is already initialized.

Definition at line 66 of file Registry.php.


The documentation for this class was generated from the following file: