[Wiki] created: Doc/Dev/RegistryH4

Michael Slusarz <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
slusarz  Tue, 02 Feb 2010 15:05:08 -0500

Created page: http://wiki.horde.org/Doc/Dev/RegistryH4

+ The Registry (Horde_Registry)

Horde's Registry is the sole method to initialize the Horde  
environment and is the glue that holds different applications together.

* The Registry system keeps track of Horde's application stack, and  
which app is currently running.
* When you switch applications, the registry will take care of  
correctly switching the gettext textdomain, loading the application  
configuration, and loading the user's application preferences.
* It also lets you determine configuration information about installed  
applications.
* The Registry lets you generate links to other apps.
  * Links will be to the application that provides the functionality.
  * Any arguments that the target script needs (headers for an email,  
for instance) will be filled out of the second argument to link().
* The Registry also lets you invoke methods in other applications
  * The registry.php config file defines where to find the code  
necessary to execute the method, and what application implements it.
  * Any application can be integrated this way; all you need to do is  
map it to the registry interface.

Things the Registry does when being instantiated:

# Importing the global configuration
# Setting up configuration of various framework libraries (via Horde_Injector)
# Setting up the session handler and starting the session
# Setting the language and gettext domain
# Restoring the registry information from cache or loading and parsing  
the registry configuration from {{config/registry.php}}
# Instantiating the global ((Doc/Dev/PermsPackage|Permission)) object  
(TODO: should be removed in favor of Horde_Injector)

((Doc/Dev/FrameworkPackage|Click here)) for Registry usage examples.

[http://cvs.horde.org/co.php/horde/config/registry.php.dist?rt=horde-git Click  
here] for documentation on how to configure the  
{{horde/config/registry.php}} file.


-- 
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.