Class Registry

Description

Implements the Registry Pattern for managing common resources.

Located in /include/classes/registry/Registry.inc (line 17)


	
			
Variable Summary
 array $mapping
Method Summary
 Registry Registry ()
 void &getResource (string $key)
 void &instance ()
 void register (string $key, mixed &$value)
Variables
array $mapping (line 23)

Mapping of associations

  • var: List of key to resources
  • access: private
Methods
Constructor Registry (line 28)

Registry Constructor.

Registry Registry ()
getResource (line 48)

Retrieive an item from the registry

  • access: public
void &getResource (string $key)
  • string $key: the identifier for the wanted resource
instance (line 37)

Singleton Access pattern

Returns the Registry. There should be no calls to the Constructor,

  • todo: when changed to PHP mark constructor private
void &instance ()
register (line 61)

Adds $value to the registry under the label of $key

  • access: public
void register (string $key, mixed &$value)
  • string $key: the Label of the new resource
  • mixed $value: the resources to register

Documentation generated on Tue, 25 Apr 2006 13:09:02 -0400 by phpDocumentor 1.3.0RC3