## Zend_Registry

Description

Generic storage class helps to manage global data.

- copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- license: New BSD License

Located in /Registry.php (line 30)

    ArrayObject
       |
       --Zend_Registry

Method Summary
static mixed get (string $index)
static Zend_Registry getInstance ()
static void init ()
static boolean isRegistered (string $index)
static void set (string $index, mixed $value)
static void setClassName ([string $registryClassName = 'Zend_Registry'])
static void setInstance (Zend_Registry $registry)
static void _unsetInstance ()
Zend_Registry __construct ([array $array = array()], [integer $flags = parent::ARRAY_AS_PROPS])
mixed offsetExists (string $index)
Methods
static get (line 141)

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.

- throws: Zend_Exception if no entry is registerd for $index.
- access: public

static mixed get (string $index)

- string $index: - get the value associated with $index

static getInstance (line 49)

Retrieves the default registry instance.

- access: public

static Zend_Registry getInstance ()
static init (line 82)

Initialize the default registry instance.

- access: protected

static void init ()
static isRegistered (line 178)

Returns TRUE if the $index is a named value in the registry, or FALSE if $index was not found in the registry.

- access: public

static boolean isRegistered (string $index)

- string $index

static set (line 165)

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.

- access: public

static void set (string $index, mixed $value)

- string $index: The location in the ArrayObject in which to store the value.
- mixed $value: The object to store in the ArrayObject.

static setClassName (line 97)

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.

- throws: Zend_Exception if the registry is initialized or if the class name is not valid.
- access: public

static void setClassName ([string $registryClassName = 'Zend_Registry'])

- string $registryClassName

static setInstance (line 66)

Set the default registry instance to a specified instance.

- throws: Zend_Exception if registry is already initialized.
- access: public

static void setInstance (Zend_Registry $registry)

- Zend_Registry $registry: An object instance of type Zend_Registry, or a subclass.

static _unsetInstance (line 125)

Unset the default registry instance.

Primarily used in tearDown() in unit tests.

- access: public

static void _unsetInstance ()
Constructor __construct (line 193)

Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object

- access: public

Zend_Registry __construct ([array $array = array()], [integer $flags = parent::ARRAY_AS_PROPS])

- array $array: data array
- integer $flags: ArrayObject flags

Redefinition of:

ArrayObject::constructor __construct ( $array )

offsetExists (line 204)

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

mixed offsetExists (string $index)

- string $index

Redefinition of:

ArrayObject::offsetExists ( $index )

#### Inherited Methods

Inherited From ArrayObject (Internal Class)

> constructor __construct ( $array )
> append ( $value )
> asort ( )
> count ( )
> exchangeArray ( $array )
> getArrayCopy ( )
> getFlags ( )
> getIterator ( )
> getIteratorClass ( )
> ksort ( )
> natcasesort ( )
> natsort ( )
> offsetExists ( $index )
> offsetGet ( $index )
> offsetSet ( $index, $newval )
> offsetUnset ( $index )
> setFlags ( $flags )
> setIteratorClass ( $iteratorClass )
> uasort ( $cmp_function )
> uksort ( $cmp_function )

Class Constants

#### Inherited Constants

Inherited from ArrayObject (Internal Class)

> ARRAY_AS_PROPS = 2
> STD_PROP_LIST = 1

Documentation generated on Tue, 26 Oct 2010 20:09:11 +0400 by phpDocumentor 1.4.2