Class Zend_Registry

Description

Implements interfaces:

Registry class for avoiding globals and some singletons

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

Located in /Zend/Registry.php (line 37)


	
			
Variable Summary
static mixed $instance
array $_registry
Method Summary
static object getInstance ()
static void setInstance ( $instance, object $registry)
Zend_Registry __construct ()
object The get ([string $name = null])
boolean has (string $name)
void set (string $name, object $obj)
Variables
static mixed $instance = NULL (line 42)

Singleton Instance

array $_registry = array() (line 48)

Object registry provides storage for shared objects

  • access: protected
Methods
static method getInstance (line 61)

Retrieves the singleton instance creating one if necessary

static object getInstance ()
static method setInstance (line 73)

Sets or clears the singleton instance

static void setInstance ( $instance, object $registry)
  • object $registry: The new registry instance
  • $instance
Constructor __construct (line 53)

Constructor

  • access: public
Zend_Registry __construct ()
get (line 126)

Retrieves a registered shared object, where $name is the registered name of the object to retrieve.

If the $name argument is NULL, an array will be returned where the keys to the array are the names of the objects in the registry and the values are the class names of those objects.

  • return: registered object.
  • access: public
  • throws: Zend_Registry_Exception
  • see: register()
object The get ([string $name = null])
  • string $name: The name for the object.

Implementation of:
Zend_Registry_Interface::get()
Retrieves a registered shared object, where $name is the registered name of the object to retrieve.
has (line 155)

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

  • access: public
boolean has (string $name)
  • string $name

Implementation of:
Zend_Registry_Interface::has()
Returns TRUE if the $name is a named object in the registry, or FALSE if $name was not found in the registry.
set (line 89)

Registers a shared object.

  • access: public
  • throws: Zend_Registry_Exception
  • todo: use SplObjectStorage if ZF minimum PHP requirement moves up to at least PHP 5.1.0
void set (string $name, object $obj)
  • string $name: The name for the object.
  • object $obj: The object to register.

Implementation of:
Zend_Registry_Interface::set()
Registers a shared object.

Documentation generated on Sun, 29 Oct 2006 21:28:00 -0600 by phpDocumentor 1.3.0RC6