Class Zend_Registry

Description

Generic storage class helps to manage global data.

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

Located in /Registry.php (line 35)

ArrayObject
   |
   --Zend_Registry
Method Summary
 static mixed get (string $index)
 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 ()
 mixed offsetExists (string $index)
Methods
static get (line 140)

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 54)

Retrieves the default registry instance.

  • access: public
static Zend_Registry getInstance ()
static init (line 87)

Initialize the default registry instance.

  • throws: Zend_Exception if default registry is already initialized.
  • access: protected
static void init ()
static isRegistered (line 176)

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 163)

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 102)

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 71)

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 124)

Unset the default registry instance.

Primarily used in tearDown() in unit tests.

  • access: public
static void _unsetInstance ()
offsetExists (line 190)
  • 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 Sun, 27 May 2007 23:27:06 -0700 by phpDocumentor 1.3.2