Class Registry

Description

The Registry:: class provides a set of methods for communication between Horde applications and keeping track of application configuration information.

Located in /Horde/Horde/Registry.php (line 30)


	
			
Variable Summary
 array $_apiCache
 mixed $_apis
 array $_appStack
 array $_confCache
 string $_currentApp
 mixed $_imgDir
 array $_interfaces
 mixed $_nocache
 mixed $_themeCache
 array $_typeCache
 mixed $_usecache
Method Summary
 TODO applicationFilePath (string $path, [string $app = null])
 TODO applicationWebPath (string $path, [string $app = null])
 TODO call (string $method, [array $args = array()])
 TODO callByPackage (string $app, string $call, [array $args = array()])
 void clearCache ()
 string get (string $parameter, [string $app = null])
 string getApp ()
 string getImageDir ([string $app = null])
 string getInitialPage ([string $app = null])
 array getSignature (string $method)
 mixed hasInterface (string $interface)
 mixed hasMethod (string $method, [string $app = null])
 boolean hasPermission ( $app, [ $permission = PERMS_READ])
 boolean importConfig (string $app)
 TODO link (string $method, [array $args = array()], [mixed $extra = ''])
 TODO linkByPackage (string $app, string $call, [array $args = array()], [mixed $extra = ''])
 array listAPIs ()
 array listApps ([array $filter = null], [boolean $assoc = false], [integer $permission = PERMS_SHOW])
 array listMethods ([string $api = null])
 array listTypes ()
 void loadPrefs ([string $app = null])
 string popApp ()
 boolean pushApp (string $app, [boolean $checkPerms = true])
 Registry &singleton ([integer $session_flags = 0])
 void unloadPrefs ([string $app = null])
 void __clone ()
 void __get ( $api)
Variables
array $applications = array() (line 59)

Hash storing information on each registry-aware application.

array $_apiCache = array() (line 37)

Hash storing all of the known services and callbacks.

mixed $_apis = array() (line 108)

The list of APIs.

array $_appStack = array() (line 66)

Stack of in-use applications.

array $_confCache = array() (line 80)

Cache of application configurations.

string $_currentApp = null (line 73)

Quick pointer to the current application.

mixed $_imgDir = array() (line 115)

Cached values of the image directories.

array $_interfaces = array() (line 52)

Hash storing all of the registered interfaces that applications provide.

mixed $_nocache = false (line 101)

Don't update cache at end of request?

mixed $_themeCache = array() (line 122)

Cached values of theme information.

array $_typeCache = array() (line 44)

Hash storing all known data types.

mixed $_updatecache = array() (line 94)

Update these cache entries on shutdown.

mixed $_usecache = false (line 87)

Are we using registry caching?

Methods
applicationFilePath (line 745)

Replace any %application% strings with the filesystem path to the application.

  • return: Returns PEAR_Error on error.
TODO applicationFilePath (string $path, [string $app = null])
  • string $path: The application string.
  • string $app: The application being called.
applicationWebPath (line 767)

Replace any %application% strings with the web path to the application.

  • return: Returns PEAR_Error on error.
TODO applicationWebPath (string $path, [string $app = null])
  • string $path: The application string.
  • string $app: The application being called.
call (line 574)

Return the hook corresponding to the default package that provides the functionality requested by the $method parameter. $method is a string consisting of "packagetype/methodname".

  • return: Returns PEAR_Error on error.
TODO call (string $method, [array $args = array()])
  • string $method: The method to call.
  • array $args: Arguments to the method.
callByPackage (line 599)

Output the hook corresponding to the specific package named.

  • return: Returns PEAR_Error on error.
TODO callByPackage (string $app, string $call, [array $args = array()])
  • string $app: The application being called.
  • string $call: The method to call.
  • array $args: Arguments to the method.
clearCache (line 348)

Clear the registry cache.

  • since: Horde 3.1
void clearCache ()
get (line 1021)

Return the requested configuration parameter for the specified

application. If no application is specified, the value of $this->_currentApp (the current application) is used. However, if the parameter is not present for that application, the Horde-wide value is used instead. If that is not present, we return null.

  • return: The requested parameter, or null if it is not set.
string get (string $parameter, [string $app = null])
  • string $parameter: The configuration value to retrieve.
  • string $app: The application to get the value for.
getApp (line 887)

Return the current application - the app at the top of the application stack.

  • return: The current application.
string getApp ()
getImageDir (line 1054)

Function to work out an application's graphics URI, taking into account any themes directories that may be set up.

  • return: The image directory uri path.
string getImageDir ([string $app = null])
  • string $app: The application for which to get the image directory. If blank will default to current application.
getInitialPage (line 1109)

Query the initial page for an application - the webroot, if there is no initial_page set, and the initial_page, if it is set.

  • return: URL pointing to the inital page of the application. Returns PEAR_Error on error.
string getInitialPage ([string $app = null])
  • string $app: The name of the application.
getSignature (line 502)

Returns a method's signature.

  • return: A two dimensional array. The first element contains an array with the parameter names, the second one the return type.
array getSignature (string $method)
  • string $method: The full name of the method to check for.
hasInterface (line 526)

Determine if an interface is implemented by an active application.

  • return: The application implementing $interface if we have it, false if the interface is not implemented.
mixed hasInterface (string $interface)
  • string $interface: The interface to check for.
hasMethod (line 542)

Determine if a method has been registered with the registry.

  • return: The application implementing $method if we have it, false if the method doesn't exist.
mixed hasMethod (string $method, [string $app = null])
  • string $method: The full name of the method to check for.
  • string $app: Only check this application.
hasPermission (line 897)

Check permissions on an application.

  • return: Whether or not access is allowed.
boolean hasPermission ( $app, [ $permission = PERMS_READ])
  • $app
  • $permission
importConfig (line 913)

Reads the configuration values for the given application and imports them into the global $conf variable.

  • return: True on success, PEAR_Error on error.
boolean importConfig (string $app)
  • string $app: The name of the application.
link (line 655)

Return the hook corresponding to the default package that provides the functionality requested by the $method parameter. $method is a string consisting of "packagetype/methodname".

  • return: Returns PEAR_Error on error.
TODO link (string $method, [array $args = array()], [mixed $extra = ''])
  • string $method: The method to link to.
  • array $args: Arguments to the method.
  • mixed $extra: Extra, non-standard arguments to the method.
linkByPackage (line 681)

Output the hook corresponding to the specific package named.

  • return: Returns PEAR_Error on error.
TODO linkByPackage (string $app, string $call, [array $args = array()], [mixed $extra = ''])
  • string $app: The application being called.
  • string $call: The method to link to.
  • array $args: Arguments to the method.
  • mixed $extra: Extra, non-standard arguments to the method.
listAPIs (line 427)

Returns all available registry APIs.

  • return: The API list.
array listAPIs ()
listApps (line 401)

Return a list of the installed and registered applications.

  • return: List of apps registered with Horde. If no applications are defined returns an empty array.
array listApps ([array $filter = null], [boolean $assoc = false], [integer $permission = PERMS_SHOW])
  • array $filter: An array of the statuses that should be returned. Defaults to non-hidden.
  • boolean $assoc: Associative array with app names as keys.
  • integer $permission: The permission level to check for in the list. Defaults to PERMS_SHOW.
listMethods (line 447)

Returns all of the available registry methods, or alternately only those for a specified API.

  • return: The method list.
array listMethods ([string $api = null])
  • string $api: Defines the API for which the methods shall be returned.
listTypes (line 487)

Returns all of the available registry data types.

  • return: The data type list.
array listTypes ()
loadPrefs (line 968)

Loads the preferences for the current user for the current application and imports them into the global $prefs variable.

void loadPrefs ([string $app = null])
  • string $app: The name of the application.
popApp (line 863)

Remove the current app from the application stack, setting the current app to whichever app was current before this one took over.

  • return: The name of the application that was popped.
string popApp ()
pushApp (line 794)

Set the current application, adding it to the top of the Horde application stack. If this is the first application to be pushed, retrieve session information as well.

pushApp() also reads the application's configuration file and sets up its global $conf hash.

  • return: Whether or not the _appStack was modified. Return PEAR_Error on error.
boolean pushApp (string $app, [boolean $checkPerms = true])
  • string $app: The name of the application to push.
  • boolean $checkPerms: Make sure that the current user has permissions to the application being loaded Defaults to true. Should ONLY be disabled by system scripts (cron jobs, etc.) and scripts that handle login.
singleton (line 134)

Returns a reference to the global Registry object, only creating it if it doesn't already exist.

This method must be invoked as: $registry = &Registry::singleton()

  • return: The Horde Registry instance.
Registry &singleton ([integer $session_flags = 0])
  • integer $session_flags: Any session flags.
unloadPrefs (line 1001)

Unload preferences from an application or (if no application is specified) from ALL applications. Useful when a user has logged out but you need to continue on the same page, etc.

After unloading, if there is an application on the app stack to load preferences from, then we reload a fresh set.

void unloadPrefs ([string $app = null])
  • string $app: The application to unload prefrences for. If null, ALL preferences are reset.
__clone (line 1136)

Clone should never be called on Registry objects. If it is, die.

  • since: Horde 3.1
void __clone ()
__get (line 1124)
  • since: Horde 3.1
void __get ( $api)
  • $api

Documentation generated on Sun, 30 Jan 2011 05:20:49 +0000 by phpDocumentor 1.4.3