:: Config_Registry (proposal)
Chapter 2

$Date$

What Config_Registry can do

Config_Registry does not exists to supplant PEAR::Config package. It will help you to manage (one or more) application, configuration and services with only a package (class).

Applications

An application, is your user-end work. It could be a horde application like IMP, Turba, ... my SW4P, or anything else.
To register an application (see Config_Registry::registerApplication()), you have to give only: a short application name (code or handler), a long name, and the file root on your web server.

Register an application is mandatory, and should be the first step of registry operation.

You can register as much application as you want.

Configurations

A configuration is a set of application-parameters and values. I use the PEAR::Config Container as internal structure
. Its help me to propose features like:

And much more. See Config_Registry:: setDefaults, getConfigResource, getConfigLayer

Layer level priority means:
When searching a config parameter value, if a 'user' value exists, it will be returned first, then 'system' and finally 'default'. See PEAR/Config of PEAR core to see what i'll try to explain.

Services

Services, also named "hooks", provides a set of functionalities for communication between applications (as plugins). See Horde::Registry concept.

Its help me to propose methods like:

continue on chapter 3 [What Config_Registry can't do]

return to [Table of Contents]