\Horde_Registry

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

Summary

Methods
Properties
Constants
appInit()
__construct()
setAuthenticationSetting()
shutdown()
__get()
__clone()
__sleep()
rebuild()
getApiInstance()
listApps()
listAllApps()
isInactive()
listAPIs()
listMethods()
hasInterface()
hasMethod()
hasLink()
call()
callByPackage()
callAppMethod()
link()
linkByPackage()
applicationFilePath()
applicationWebPath()
showService()
getServiceLink()
pushApp()
popApp()
getApp()
hasPermission()
importConfig()
loadPrefs()
loadConfigFile()
get()
getVersion()
hasFeature()
hasView()
setView()
getView()
getAppDrivers()
getInitialPage()
clearAuth()
clearAuthApp()
isAdmin()
isAuthenticated()
currentProcessAuth()
getLogoutUrl()
downloadUrl()
convertUsername()
getAuth()
passwordChangeRequested()
getAuthCredential()
setAuthCredential()
remoteHost()
setAuth()
checkExistingAuth()
removeUser()
removeUserData()
getAuthInfo()
getAuthApps()
getLanguageCharset()
getEmailCharset()
preferredLang()
setLanguage()
setLanguageEnvironment()
setTextdomain()
setTimeZone()
isTest()
$applications
$authException
$hordeInit
$initialApp
$nlsconfig
$vhost
SESSION_NONE
SESSION_READONLY
AUTH_FAILURE
NOT_ACTIVE
PERMISSION_DENIED
HOOK_FATAL
INITCALLBACK_FATAL
VIEW_BASIC
VIEW_DYNAMIC
VIEW_MINIMAL
VIEW_SMARTMOBILE
REGISTRY_CACHE
_loadApplications()
_cacheId()
_loadApi()
_doHasSearch()
_methodLookup()
_pushAppError()
_getAuthCredentials()
_mapLang()
$_apiList
$_appStack
$_appsInit
$_args
$_cache
$_interfaces
$_regmtime
N/A
No private methods found
No private properties found
N/A

Constants

SESSION_NONE

SESSION_NONE

SESSION_READONLY

SESSION_READONLY

AUTH_FAILURE

AUTH_FAILURE

NOT_ACTIVE

NOT_ACTIVE

PERMISSION_DENIED

PERMISSION_DENIED

HOOK_FATAL

HOOK_FATAL

INITCALLBACK_FATAL

INITCALLBACK_FATAL

VIEW_BASIC

VIEW_BASIC

VIEW_DYNAMIC

VIEW_DYNAMIC

VIEW_MINIMAL

VIEW_MINIMAL

VIEW_SMARTMOBILE

VIEW_SMARTMOBILE

REGISTRY_CACHE

REGISTRY_CACHE

Properties

$applications

$applications : array

Hash storing information on each registry-aware application.

Type

array

$authException

$authException : \Exception

Original authentication exception. Set if 'fallback' auth is used, and authentication fails.

Type

\Exception

$hordeInit

$hordeInit : boolean

A flag that is set once the basic horde application has been minimally configured.

Type

boolean

$initialApp

$initialApp : string

The application that called appInit().

Type

string

$vhost

$vhost : string

The current virtual host configuration file.

Type

string

$_apiList

$_apiList : array

The list of APIs.

Type

array

$_appStack

$_appStack : array

Stack of in-use applications.

Type

array

$_appsInit

$_appsInit : array

The list of applications initialized during this access.

Type

array

$_args

$_args : array

The arguments that have been passed when instantiating the registry.

Type

array

$_cache

$_cache : array

Internal cached data.

Type

array

$_interfaces

$_interfaces : array

Interfaces list.

Type

array

$_regmtime

$_regmtime : integer

The last modified time of the newest modified registry file.

Type

integer

Methods

appInit()

appInit(string  $app, array  $args = array()) : \Horde_Registry_Application

Application bootstrap initialization.

Solves chicken-and-egg problem - need a way to init Horde environment from application without an active Horde_Registry object.

Page compression will be started (if configured).

Global variables defined:

  - $browser: Horde_Browser object
  - $cli: Horde_Cli object (if 'cli' is true)
  - $conf: Configuration array
  - $injector: Horde_Injector object
  - $language: Language
  - $notification: Horde_Notification object
  - $page_output: Horde_PageOutput object
  - $prefs: Horde_Prefs object
  - $registry: Horde_Registry object
  - $session: Horde_Session object

Parameters

string $app

The application to initialize.

array $args

Optional arguments:

  - admin: (boolean) Require authenticated user to be an admin?
           DEFAULT: false
  - authentication: (string) The type of authentication to use:
    - none: Do not authenticate
    - fallback: Attempt to authenticate; if failure, then don't auth
                (@since 2.11.0).
    - [DEFAULT]: Authenticate; on no auth redirect to login screen
  - cli: (boolean) Initialize a CLI interface. Setting this to true
         implicitly sets 'authentication' to 'none' and 'admin' and
         'nocompress' to true.
         DEFAULT: false
  - nocompress: (boolean) If set, the page will not be compressed.
                DEFAULT: false
  - nologintasks: (boolean) If set, don't perform logintasks (never
                  performed if authentication is 'none').
                  DEFAULT: false
  - nonotificationinit: (boolean) If set, don't initialize the
                        application handlers for the notification
                        system (@since 2.12.0).
  - permission: (array) The permission required by the user to access
                the page. The first element (REQUIRED) is the permission
                name. The second element (OPTION; defaults to SHOW) is
                the permission level.
  - session_cache_limiter: (string) Use this value for the session
                           cache limiter.
                           DEFAULT: Uses the value in the config.
  - session_control: (string) Special session control limitations:
    - netscape: TODO; start read/write session
    - none: Do not start a session
    - readonly: Start session readonly
    - [DEFAULT] - Start read/write session
  - test: (boolean) Is this the test script? If so, we relax several
          sanity checks and don't load things from the cache.
          DEFAULT: false
  - timezone: (boolean) Set the time zone?
              DEFAULT: false
  - user_admin: (boolean) Set authentication to an admin user?
                DEFAULT: false

Throws

\Horde_Exception

Returns

\Horde_Registry_Application

The application object.

__construct()

__construct(integer  $session_flags, array  $args = array()) 

Create a new Horde_Registry instance.

Parameters

integer $session_flags

Any session flags.

array $args

See appInit().

Throws

\Horde_Exception

setAuthenticationSetting()

setAuthenticationSetting(string  $authentication) 

(Re)set the authentication parameter. Useful for requests, such as Rpc requests where we actually don't perform authentication until later in the request, but still need Horde bootstrapped early in the request. Also clears the local app/api cache since applications will probably already have been initialized during Notification polling.

Parameters

string $authentication

The authentication setting.

shutdown()

shutdown() 

Events to do on shutdown.

__get()

__get(  $api) 

A property call to the registry object will return a Caller object.

Parameters

$api

__clone()

__clone() 

Clone should never be called on this object. If it is, die.

Throws

\Horde_Exception

__sleep()

__sleep() 

serialize() should never be called on this object. If it is, die.

Throws

\Horde_Exception

rebuild()

rebuild() 

Rebuild the registry configuration.

getApiInstance()

getApiInstance(string  $app, string  $type) : \Horde_Registry_Api|\Horde_Registry_Application

Retrieve an API object.

Parameters

string $app

The application to load.

string $type

Either 'application' or 'api'.

Throws

\Horde_Exception

Returns

\Horde_Registry_Api|\Horde_Registry_Application

The API object.

listApps()

listApps(array  $filter = null, boolean  $assoc = false, integer  $perms = \Horde_Perms::SHOW) : array

Return a list of the installed and registered applications.

Parameters

array $filter

An array of the statuses that should be returned. Defaults to non-hidden.

boolean $assoc

Return hash with app names as keys and config parameters as values?

integer $perms

The permission level to check for in the list. If null, skips permission check.

Returns

array —

List of apps registered with Horde. If no applications are defined returns an empty array.

listAllApps()

listAllApps() : array

Return a list of all applications, ignoring permissions.

Returns

array —

List of all apps registered with Horde.

isInactive()

isInactive(string  $app) : boolean

Is the given application inactive?

Parameters

string $app

The application to check.

Returns

boolean —

True if inactive.

listAPIs()

listAPIs() : array

Returns all available registry APIs.

Returns

array —

The API list.

listMethods()

listMethods(string  $api = null) : array

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

Parameters

string $api

Defines the API for which the methods shall be returned. If null, returns all methods.

Returns

array —

The method list.

hasInterface()

hasInterface(string  $interface) : mixed

Determine if an interface is implemented by an active application.

Parameters

string $interface

The interface to check for.

Returns

mixed —

The application implementing $interface if we have it, false if the interface is not implemented.

hasMethod()

hasMethod(string  $method, string  $app = null) : mixed

Determine if a method has been registered with the registry.

Parameters

string $method

The full name of the method to check for.

string $app

Only check this application.

Returns

mixed —

The application implementing $method if we have it, false if the method doesn't exist.

hasLink()

hasLink(string  $method, string  $app = null) : mixed

Determine if a link has been registered with the registry.

Parameters

string $method

The full name of the link method to check for.

string $app

Only check this application.

Returns

mixed —

The application implementing $method if we have it, false if the link method doesn't exist.

call()

call(string  $method, array  $args = array()) : mixed

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".

Parameters

string $method

The method to call.

array $args

Arguments to the method.

Throws

\Horde_Exception

Returns

mixed —

Return from method call.

callByPackage()

callByPackage(string  $app, string  $call, array  $args = array(), array  $options = array()) : mixed

Output the hook corresponding to the specific package named.

Parameters

string $app

The application being called.

string $call

The method to call.

array $args

Arguments to the method.

array $options

Additional options:

  • noperms: (boolean) If true, don't check the perms.

Throws

\Horde_Exception_PushApp

Returns

mixed —

Return from application call.

callAppMethod()

callAppMethod(string  $app, string  $call, array  $options = array()) : mixed

Call a private Horde application method.

Parameters

string $app

The application name.

string $call

The method to call.

array $options

Additional options:

  • args: (array) Additional parameters to pass to the method.
  • check_missing: (boolean) If true, throws an Exception if method does not exist. Otherwise, will return null.
  • noperms: (boolean) If true, don't check the perms.

Throws

\Horde_Exception

Application methods should throw this if there is a fatal error.

\Horde_Exception_PushApp

Returns

mixed —

Various.

link()

link(string  $method, array  $args = array(), mixed  $extra = '') : string

Returns the link corresponding to the default package that provides the functionality requested by the $method parameter.

Parameters

string $method

The method to link to, consisting of "packagetype/methodname".

array $args

Arguments to the method.

mixed $extra

Extra, non-standard arguments to the method.

Throws

\Horde_Exception

Returns

string —

The link for that method.

linkByPackage()

linkByPackage(string  $app, string  $call, array  $args = array(), mixed  $extra = '') : string

Returns the link corresponding to the specific package named.

Parameters

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.

Throws

\Horde_Exception

Returns

string —

The link for that method.

applicationFilePath()

applicationFilePath(string  $path, string  $app = null) : string

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

Parameters

string $path

The application string.

string $app

The application being called.

Throws

\Horde_Exception

Returns

string —

The application file path.

applicationWebPath()

applicationWebPath(string  $path, string  $app = null) : string

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

Parameters

string $path

The application string.

string $app

The application being called.

Returns

string —

The application web path.

showService()

showService(string  $type) : boolean

TODO

Parameters

string $type

The type of link.

The following must be defined in Horde's menu config, or else they
won't be displayed in the menu:
'help', 'problem', 'logout', 'login', 'prefs'

Returns

boolean —

True if the link is to be shown.

getServiceLink()

getServiceLink(string  $type, string  $app = null, boolean  $full = false) : \Horde_Url

Returns the URL to access a Horde service.

Parameters

string $type

The service to display:

  • ajax: AJAX endpoint.
  • cache: Cached data output.
  • download: Download link.
  • emailconfirm: E-mail confirmation page.
  • go: URL redirection utility.
  • help: Help page.
  • imple: Imple endpoint.
  • login: Login page.
  • logintasks: Logintasks page.
  • logout: Logout page.
  • pixel: Pixel generation page.
  • portal: Main portal page.
  • prefs: Preferences UI.
  • problem: Problem reporting page.
string $app

The name of the current Horde application.

boolean $full

Return a full url? @since 2.4.0

Throws

\Horde_Exception

Returns

\Horde_Url —

The link.

pushApp()

pushApp(string  $app, array  $options = array()) : boolean

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.

Parameters

string $app

The name of the application to push.

array $options

Additional options:

  • check_perms: (boolean) Make sure that the current user has permissions to the application being loaded. Should ONLY be disabled by system scripts (cron jobs, etc.) and scripts that handle login. DEFAULT: true
  • logintasks: (boolean) Perform login tasks? Only performed if 'check_perms' is also true. System tasks are always peformed if the user is authorized. DEFAULT: false
  • notransparent: (boolean) Do not attempt transparent authentication. DEFAULT: false

Throws

\Horde_Exception_PushApp

Returns

boolean —

Whether or not the _appStack was modified.

popApp()

popApp() : string

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

Throws

\Horde_Exception

Returns

string —

The name of the application that was popped.

getApp()

getApp() : string

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

Returns

string —

The current application.

hasPermission()

hasPermission(string  $app, integer  $perms = \Horde_Perms::READ, array  $params = array()) : boolean

Check permissions on an application.

Parameters

string $app

The name of the application

integer $perms

The permission level to check for.

array $params

Additional options:

  • notransparent: (boolean) Do not attempt transparent authentication. DEFAULT: false

Returns

boolean —

Whether access is allowed.

importConfig()

importConfig(string  $app) 

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

Parameters

string $app

The application name.

loadPrefs()

loadPrefs(string  $app = null) 

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

$app will be the active application after calling this function.

Parameters

string $app

The name of the application.

Throws

\Horde_Exception

loadConfigFile()

loadConfigFile(string  $conf_file, mixed  $vars = null, string  $app = null) : \Horde_Registry_Loadconfig

Load a configuration file from a Horde application's config directory.

This call is cached (a config file is only loaded once, regardless of the $vars value).

Parameters

string $conf_file

Configuration file name.

mixed $vars

List of config variables to load.

string $app

Application.

Throws

\Horde_Exception

Returns

\Horde_Registry_Loadconfig

The config object.

get()

get(string  $parameter, string  $app = null) : string

Return the requested configuration parameter for the specified application. If no application is specified, the value of 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.

Parameters

string $parameter

The configuration value to retrieve.

string $app

The application to get the value for.

Returns

string —

The requested parameter, or null if it is not set.

getVersion()

getVersion(string  $app = null, boolean  $number = false) : string

Return the version string for a given application.

Parameters

string $app

The application to get the value for.

boolean $number

Return the raw version number, suitable for comparison purposes.

Returns

string —

The version string for the application.

hasFeature()

hasFeature(string  $id, string  $app = null) : boolean

Does the application have the queried feature?

Parameters

string $id

Feature ID.

string $app

The application to check (defaults to current app).

Returns

boolean —

True if the application has the feature.

hasView()

hasView(integer  $view, string  $app = null) : boolean

Does the given application have the queried view?

Parameters

integer $view

The view type (VIEW_* constant).

string $app

The application to check (defaults to current app).

Returns

boolean —

True if the view is available in the application.

setView()

setView(integer  $view = self::VIEW_BASIC) 

Set current view.

Parameters

integer $view

The view type.

getView()

getView() : integer

Get current view.

Returns

integer —

The view type.

getAppDrivers()

getAppDrivers(string  $app, string  $prefix) : array

Returns a list of available drivers for a library that are available in an application.

Parameters

string $app

The application name.

string $prefix

The library prefix.

Returns

array —

The list of available class names.

getInitialPage()

getInitialPage(string  $app = null) : string

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

Parameters

string $app

The name of the application.

Throws

\Horde_Exception

Returns

string —

URL pointing to the initial page of the application.

clearAuth()

clearAuth(boolean  $destroy = true) 

Clears any authentication tokens in the current session.

Parameters

boolean $destroy

Destroy the session?

clearAuthApp()

clearAuthApp(  $app) : boolean

Clears authentication tokens for a given application in the current session.

Parameters

$app

Returns

boolean —

If false, did not remove authentication token because the application is in control of Horde's auth.

isAdmin()

isAdmin(array  $options = array()) : boolean

Is a user an administrator?

Parameters

array $options

Options:

  • permission: (string) Allow users with this permission admin access in the current context.
  • permlevel: (integer) The level of permissions to check for. Defaults to Horde_Perms::EDIT.
  • user: (string) The user to check. Defaults to self::getAuth().

Returns

boolean —

Whether or not this is an admin user.

isAuthenticated()

isAuthenticated(array  $opts = array()) : boolean

Checks if there is a session with valid auth information. If there isn't, but the configured Auth driver supports transparent authentication, then we try that.

Parameters

array $opts

Additional options:

  • app: (string) Check authentication for this app. DEFAULT: Checks horde-wide authentication.
  • notransparent: (boolean) Do not attempt transparent authentication. DEFAULT: false

Returns

boolean —

Whether or not the user is authenticated.

currentProcessAuth()

currentProcessAuth() : boolean

Checks whether this process required authentication.

Returns

boolean —

True if the current process required authentication.

getLogoutUrl()

getLogoutUrl(array  $options = array()) : \Horde_Url

Returns a URL to the login screen, adding the necessary logout parameters.

If no reason/msg is passed in, uses the current global authentication error message.

Parameters

array $options

Additional options:

  • app: (string) Authenticate to this application DEFAULT: Horde
  • msg: (string) If reason is Horde_Auth::REASON_MESSAGE, the message to display to the user. DEFAULT: None
  • params: (array) Additional params to add to the URL (not allowed: 'app', 'horde_logout_token', 'msg', 'reason', 'url'). DEFAULT: None
  • reason: (integer) The reason for logout DEFAULT: None

Returns

\Horde_Url —

The formatted URL.

downloadUrl()

downloadUrl(string  $filename, array  $params = array()) : \Horde_Url

Returns a URL to be used for downloading data.

Parameters

string $filename

The filename of the download data.

array $params

Additional URL parameters needed.

Returns

\Horde_Url —

The download URL. This URL should be used as-is, since the filename MUST be the last parameter added to the URL.

convertUsername()

convertUsername(string  $userId, boolean  $toHorde) : string

Converts an authentication username to a unique Horde username.

Parameters

string $userId

The username to convert.

boolean $toHorde

If true, convert to a Horde username. If false, convert to the auth username.

Throws

\Horde_Exception

Returns

string —

The converted username.

getAuth()

getAuth(string  $format = null) : mixed

Returns the currently logged in user, if there is one.

Parameters

string $format

The return format, defaults to the unique Horde ID. Alternative formats:

  • bare: (string) Horde ID without any domain information. EXAMPLE: foo@example.com would be returned as 'foo'.
  • domain: (string) Domain of the Horde ID. EXAMPLE: foo@example.com would be returned as 'example.com'.
  • original: (string) The username used to originally login to Horde.

Returns

mixed —

The user ID or false if no user is logged in.

passwordChangeRequested()

passwordChangeRequested() : boolean

Return whether the authentication backend requested a password change.

Returns

boolean —

Whether the backend requested a password change.

getAuthCredential()

getAuthCredential(string  $credential = null, string  $app = null) : mixed

Returns the requested credential for the currently logged in user, if present.

Parameters

string $credential

The credential to retrieve.

string $app

The app to query. Defaults to Horde.

Returns

mixed —

The requested credential, all credentials if $credential is null, or false if no user is logged in.

setAuthCredential()

setAuthCredential(mixed  $credential, string  $value = null, string  $app = null) 

Sets the requested credential for the currently logged in user.

Parameters

mixed $credential

The credential to set. If an array, overwrites the current credentials array.

string $value

The value to set the credential to. If $credential is an array, this value is ignored.

string $app

The app to update. Defaults to Horde.

remoteHost()

remoteHost() : object

Returns information about the remote host.

Returns

object —

An object with the following properties:

  - addr: (string) Remote IP address.
  - host: (string) Remote hostname (if resolvable; otherwise, this value
          is identical to 'addr').
  - proxy: (boolean) True if this user is connecting through a proxy.

setAuth()

setAuth(string  $authId, array  $credentials, array  $options = array()) 

Sets data in the session saying that authorization has succeeded, note which userId was authorized, and note when the login took place.

If a user name hook was defined in the configuration, it gets applied to the $userId at this point.

Parameters

string $authId

The userId that has been authorized.

array $credentials

The credentials of the user.

array $options

Additional options:

  • app: (string) The app to set authentication credentials for. DEFAULT: 'horde'
  • change: (boolean) Whether to request that the user change their password. DEFAULT: No
  • language: (string) The preferred language. DEFAULT: null
  • no_convert: (boolean) Don't convert the user name with the authusername hook. DEFAULT: false

checkExistingAuth()

checkExistingAuth(string  $app = 'horde') : boolean

Check existing auth for triggers that might invalidate it.

Parameters

string $app

Check authentication for this app too.

Returns

boolean —

Is existing auth valid?

removeUser()

removeUser(string  $userId) 

Removes a user from the authentication backend and calls all applications' removeUserData API methods.

Parameters

string $userId

The userId to delete.

Throws

\Horde_Exception

removeUserData()

removeUserData(string  $user, string  $app = null) 

Removes user's application data.

Parameters

string $user

The user ID to delete.

string $app

If set, only removes data from this application. By default, removes data from all apps.

Throws

\Horde_Exception

getAuthInfo()

getAuthInfo() : array

Returns authentication metadata information.

Returns

array —

Authentication metadata:

  • authId: (string) The username used during the original auth.
  • browser: (string) The remote browser string.
  • change: (boolean) Is a password change requested?
  • credentials: (string) The 'auth_app' entry that contains the Horde credentials.
  • remoteAddr: (string) The remote IP address of the user.
  • timestamp: (integer) The login time.
  • userId: (string) The unique Horde username.

getAuthApps()

getAuthApps() : array

Returns the list of applications currently authenticated to.

Returns

array —

List of authenticated applications.

getLanguageCharset()

getLanguageCharset() : string

Returns the charset for the current language.

Returns

string —

The character set that should be used with the current locale settings.

getEmailCharset()

getEmailCharset() : string

Returns the charset to use for outgoing emails.

Returns

string —

The preferred charset for outgoing mails based on the user's preferences and the current language.

preferredLang()

preferredLang(string  $lang = null) : string

Selects the most preferred language for the current client session.

Parameters

string $lang

Force to use this language.

Returns

string —

The selected language abbreviation.

setLanguage()

setLanguage(string  $lang = null) : string

Sets the language.

Parameters

string $lang

The language abbreviation.

Throws

\Horde_Exception

Returns

string —

The current language (since 2.5.0).

setLanguageEnvironment()

setLanguageEnvironment(string  $lang = null, string  $app = null) 

Sets the language and reloads the whole NLS environment.

When setting the language, the gettext catalogs have to be reloaded too, charsets have to be updated etc. This method takes care of all this.

Parameters

string $lang

The new language.

string $app

The application for reloading the gettext catalog. Uses current application if null.

setTextdomain()

setTextdomain(string  $app, string  $directory) 

Sets the gettext domain.

Parameters

string $app

The application name.

string $directory

The directory where the application's LC_MESSAGES directory resides.

setTimeZone()

setTimeZone() 

Sets the current timezone, if available.

isTest()

isTest() : boolean

Is the registry in 'test' mode?

Returns

boolean —

True if in testing mode.

_loadApplications()

_loadApplications() 

Load application information from registry config files.

_cacheId()

_cacheId(string  $hash = null) 

Get the cache ID for the registry information.

Parameters

string $hash

If set, hash this value and use as the hash of the registry. If false, uses session stored value.

_loadApi()

_loadApi(string  $app) : \Horde_Registry_Api

Load an application's API object.

Parameters

string $app

The application to load.

Returns

\Horde_Registry_Api

The API object, or null if not available.

_doHasSearch()

_doHasSearch(  $method,   $app, string  $func) : mixed

Do the has*() search.

Parameters

$method
$app
string $func

The API function to call to get the list of elements to search. Either 'methods' or 'links'.

Returns

mixed —

The application implementing $method, false if it doesn't exist;

_methodLookup()

_methodLookup(string  $method) : mixed

Do a lookup of method name -> app call.

Parameters

string $method

The method name.

Returns

mixed —

An array containing the app and method call, or false if not found.

_pushAppError()

_pushAppError(\Exception  $e, integer  $error) 

Process Exceptions thrown when pushing app on stack.

Parameters

\Exception $e

The thrown Exception.

integer $error

The pushApp() error type.

Throws

\Horde_Exception_PushApp

_getAuthCredentials()

_getAuthCredentials(string  $app) : mixed

Get the list of credentials for a given app.

Parameters

string $app

The application name.

Returns

mixed —

True, false, or the credential list.

_mapLang()

_mapLang(string  $language) : string

Maps languages with common two-letter codes (such as nl) to the full locale code (in this case, nl_NL). Returns the language unmodified if it isn't an alias.

Parameters

string $language

The language code to map.

Returns

string —

The mapped language code.