Свойство | Type | Description | |
---|---|---|---|
$applications | array | Hash storing information on each registry-aware application. | |
$authException | Exception | Original authentication exception. Set if 'fallback' auth is used, and authentication fails. | |
$hordeInit | boolean | A flag that is set once the basic horde application has been minimally configured. | |
$initialApp | string | The application that called appInit(). | |
$nlsconfig | Horde_Registry_Nlsconfig | NLS configuration. | |
$vhost | string | The current virtual host configuration file. |
Свойство | Type | Description | |
---|---|---|---|
$_apiList | array | The list of APIs. | |
$_appStack | array | Stack of in-use applications. | |
$_appsInit | array | The list of applications initialized during this access. | |
$_args | array | The arguments that have been passed when instantiating the registry. | |
$_cache | array | Internal cached data. | |
$_interfaces | array | Interfaces list. | |
$_regmtime | integer | The last modified time of the newest modified registry file. |
Méthode | Description | |
---|---|---|
__clone ( ) | Clone should never be called on this object. If it is, die. | |
__construct ( integer $session_flags, array $args = [] ) | Create a new Horde_Registry instance. | |
__get ( $api ) | A property call to the registry object will return a Caller object. | |
__sleep ( ) | serialize() should never be called on this object. If it is, die. | |
appInit ( string $app, array $args = [] ) : Horde_Registry_Application | Application bootstrap initialization. | |
applicationFilePath ( string $path, string $app = null ) : string | Replace any %application% strings with the filesystem path to the application. | |
applicationWebPath ( string $path, string $app = null ) : string | Replace any %application% strings with the web path to the application. | |
call ( string $method, array $args = [] ) : mixed | Return the hook corresponding to the default package that provides the functionality requested by the $method parameter. | |
callAppMethod ( string $app, string $call, array $options = [] ) : mixed | Call a private Horde application method. | |
callByPackage ( string $app, string $call, array $args = [], array $options = [] ) : mixed | Output the hook corresponding to the specific package named. | |
checkExistingAuth ( string $app = 'horde' ) : boolean | Check existing auth for triggers that might invalidate it. | |
clearAuth ( boolean $destroy = true ) | Clears any authentication tokens in the current session. | |
clearAuthApp ( $app ) : boolean | Clears authentication tokens for a given application in the current session. | |
convertUsername ( string $userId, boolean $toHorde ) : string | Converts an authentication username to a unique Horde username. | |
currentProcessAuth ( ) : boolean | Checks whether this process required authentication. | |
downloadUrl ( string $filename, array $params = [] ) : Horde_Url | Returns a URL to be used for downloading data. | |
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. | |
getApiInstance ( string $app, string $type ) : Horde_Registry_Api | Horde_Registry_Application | Retrieve an API object. | |
getApp ( ) : string | Return the current application - the app at the top of the application stack. | |
getAppDrivers ( string $app, string $prefix ) : array | Returns a list of available drivers for a library that are available in an application. | |
getAuth ( string $format = null ) : mixed | Returns the currently logged in user, if there is one. | |
getAuthApps ( ) : array | Returns the list of applications currently authenticated to. | |
getAuthCredential ( string $credential = null, string $app = null ) : mixed | Returns the requested credential for the currently logged in user, if present. | |
getAuthInfo ( ) : array | Returns authentication metadata information. | |
getEmailCharset ( ) : string | Returns the charset to use for outgoing emails. | |
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. | |
getLanguageCharset ( ) : string | Returns the charset for the current language. | |
getLogoutUrl ( array $options = [] ) : Horde_Url | Returns a URL to the login screen, adding the necessary logout parameters. | |
getServiceLink ( string $type, string $app = null, boolean $full = false ) : Horde_Url | Returns the URL to access a Horde service. | |
getVersion ( string $app = null, boolean $number = false ) : string | Return the version string for a given application. | |
getView ( ) : integer | Get current view. | |
hasFeature ( string $id, string $app = null ) : boolean | Does the application have the queried feature? | |
hasInterface ( string $interface ) : mixed | Determine if an interface is implemented by an active application. | |
hasLink ( string $method, string $app = null ) : mixed | Determine if a link has been registered with the registry. | |
hasMethod ( string $method, string $app = null ) : mixed | Determine if a method has been registered with the registry. | |
hasPermission ( string $app, integer $perms = Horde_Perms::READ, array $params = [] ) : boolean | Check permissions on an application. | |
hasView ( integer $view, string $app = null ) : boolean | Does the given application have the queried view? | |
importConfig ( string $app ) | Reads the configuration values for the given application and imports them into the global $conf variable. | |
isAdmin ( array $options = [] ) : boolean | Is a user an administrator? | |
isAuthenticated ( array $opts = [] ) : 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. | |
isInactive ( string $app ) : boolean | Is the given application inactive? | |
isTest ( ) : boolean | Is the registry in 'test' mode? | |
link ( string $method, array $args = [], mixed $extra = '' ) : string | Returns the link corresponding to the default package that provides the functionality requested by the $method parameter. | |
linkByPackage ( string $app, string $call, array $args = [], mixed $extra = '' ) : string | Returns the link corresponding to the specific package named. | |
listAPIs ( ) : array | Returns all available registry APIs. | |
listAllApps ( ) : array | Return a list of all applications, ignoring permissions. | |
listApps ( array $filter = null, boolean $assoc = false, integer $perms = Horde_Perms::SHOW ) : array | Return a list of the installed and registered applications. | |
listMethods ( string $api = null ) : array | Returns all of the available registry methods, or alternately only those for a specified API. | |
loadConfigFile ( string $conf_file, mixed $vars = null, string $app = null ) : Horde_Registry_Loadconfig | Load a configuration file from a Horde application's config directory. | |
loadPrefs ( string $app = null ) | Loads the preferences for the current user for the current application and imports them into the global $prefs variable. | |
passwordChangeRequested ( ) : boolean | Return whether the authentication backend requested a password change. | |
popApp ( ) : string | Remove the current app from the application stack, setting the current app to whichever app was current before this one took over. | |
preferredLang ( string $lang = null ) : string | Selects the most preferred language for the current client session. | |
pushApp ( string $app, array $options = [] ) : 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. | |
rebuild ( ) | Rebuild the registry configuration. | |
remoteHost ( ) : object | Returns information about the remote host. | |
removeUser ( string $userId ) | Removes a user from the authentication backend and calls all applications' removeUserData API methods. | |
removeUserData ( string $user, string $app = null ) | Removes user's application data. | |
setAuth ( string $authId, array $credentials, array $options = [] ) | Sets data in the session saying that authorization has succeeded, note which userId was authorized, and note when the login took place. | |
setAuthCredential ( mixed $credential, string $value = null, string $app = null ) | Sets the requested credential for the currently logged in user. | |
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. | |
setLanguage ( string $lang = null ) : string | Sets the language. | |
setLanguageEnvironment ( string $lang = null, string $app = null ) | Sets the language and reloads the whole NLS environment. | |
setTextdomain ( string $app, string $directory ) | Sets the gettext domain. | |
setTimeZone ( ) | Sets the current timezone, if available. | |
setView ( integer $view = self::VIEW_BASIC ) | Set current view. | |
showService ( string $type ) : boolean | TODO | |
shutdown ( ) | Events to do on shutdown. |
Méthode | Description | |
---|---|---|
_cacheId ( string $hash = null ) | Get the cache ID for the registry information. | |
_doHasSearch ( $method, $app, string $func ) : mixed | Do the has*() search. | |
_getAuthCredentials ( string $app ) : mixed | Get the list of credentials for a given app. | |
_loadApi ( string $app ) : Horde_Registry_Api | Load an application's API object. | |
_loadApplications ( ) | Load application information from registry config files. | |
_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. | |
_methodLookup ( string $method ) : mixed | Do a lookup of method name -> app call. | |
_pushAppError ( Exception $e, integer $error ) | Process Exceptions thrown when pushing app on stack. |
public __clone ( ) |
public __construct ( integer $session_flags, array $args = [] ) | ||
$session_flags | integer | Any session flags. |
$args | array | See appInit(). |
public __get ( $api ) |
public __sleep ( ) |
protected _doHasSearch ( $method, $app, string $func ) : mixed | ||
$func | string | The API function to call to get the list of elements to search. Either 'methods' or 'links'. |
Résultat | mixed | The application implementing $method, false if it doesn't exist; |
protected _getAuthCredentials ( string $app ) : mixed | ||
$app | string | The application name. |
Résultat | mixed | True, false, or the credential list. |
protected _loadApplications ( ) |
protected _methodLookup ( string $method ) : mixed | ||
$method | string | The method name. |
Résultat | mixed | An array containing the app and method call, or false if not found. |
protected _pushAppError ( Exception $e, integer $error ) | ||
$e | Exception | The thrown Exception. |
$error | integer | The pushApp() error type. |
- $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
public static appInit ( string $app, array $args = [] ) : Horde_Registry_Application | ||
$app | string | The application to initialize. |
$args | array | 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 |
Résultat | Horde_Registry_Application | The application object. |
public callAppMethod ( string $app, string $call, array $options = [] ) : mixed | ||
$app | string | The application name. |
$call | string | The method to call. |
$options | array | 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. |
Résultat | mixed | Various. |
public callByPackage ( string $app, string $call, array $args = [], array $options = [] ) : mixed | ||
$app | string | The application being called. |
$call | string | The method to call. |
$args | array | Arguments to the method. |
$options | array | Additional options: - noperms: (boolean) If true, don't check the perms. |
Résultat | mixed | Return from application call. |
public checkExistingAuth ( string $app = 'horde' ) : boolean | ||
$app | string | Check authentication for this app too. |
Résultat | boolean | Is existing auth valid? |
public clearAuthApp ( $app ) : boolean | ||
Résultat | boolean | If false, did not remove authentication token because the application is in control of Horde's auth. |
public currentProcessAuth ( ) : boolean | ||
Résultat | boolean | True if the current process required authentication. |
public downloadUrl ( string $filename, array $params = [] ) : Horde_Url | ||
$filename | string | The filename of the download data. |
$params | array | Additional URL parameters needed. |
Résultat | Horde_Url | The download URL. This URL should be used as-is, since the filename MUST be the last parameter added to the URL. |
public getApiInstance ( string $app, string $type ) : Horde_Registry_Api | Horde_Registry_Application | ||
$app | string | The application to load. |
$type | string | Either 'application' or 'api'. |
Résultat | Horde_Registry_Api | Horde_Registry_Application | The API object. |
public getAuth ( string $format = null ) : mixed | ||
$format | string | The return format, defaults to the unique Horde ID. Alternative formats: - bare: (string) Horde ID without any domain information. EXAMPLE: [email protected] would be returned as 'foo'. - domain: (string) Domain of the Horde ID. EXAMPLE: [email protected] would be returned as 'example.com'. - original: (string) The username used to originally login to Horde. |
Résultat | mixed | The user ID or false if no user is logged in. |
public getAuthApps ( ) : array | ||
Résultat | array | List of authenticated applications. |
public getAuthInfo ( ) : array | ||
Résultat | 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. |
public getEmailCharset ( ) : string | ||
Résultat | string | The preferred charset for outgoing mails based on the user's preferences and the current language. |
public getInitialPage ( string $app = null ) : string | ||
$app | string | The name of the application. |
Résultat | string | URL pointing to the initial page of the application. |
public getLanguageCharset ( ) : string | ||
Résultat | string | The character set that should be used with the current locale settings. |
public getLogoutUrl ( array $options = [] ) : Horde_Url | ||
$options | array | 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 |
Résultat | Horde_Url | The formatted URL. |
public getServiceLink ( string $type, string $app = null, boolean $full = false ) : Horde_Url | ||
$type | string | 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. |
$app | string | The name of the current Horde application. |
$full | boolean | Return a full url? @since 2.4.0 |
Résultat | Horde_Url | The link. |
public hasInterface ( string $interface ) : mixed | ||
$interface | string | The interface to check for. |
Résultat | mixed | The application implementing $interface if we have it, false if the interface is not implemented. |
public hasPermission ( string $app, integer $perms = Horde_Perms::READ, array $params = [] ) : boolean | ||
$app | string | The name of the application |
$perms | integer | The permission level to check for. |
$params | array | Additional options: - notransparent: (boolean) Do not attempt transparent authentication. DEFAULT: false |
Résultat | boolean | Whether access is allowed. |
public importConfig ( string $app ) | ||
$app | string | The application name. |
public isAdmin ( array $options = [] ) : boolean | ||
$options | array | 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(). |
Résultat | boolean | Whether or not this is an admin user. |
public isAuthenticated ( array $opts = [] ) : boolean | ||
$opts | array | Additional options: - app: (string) Check authentication for this app. DEFAULT: Checks horde-wide authentication. - notransparent: (boolean) Do not attempt transparent authentication. DEFAULT: false |
Résultat | boolean | Whether or not the user is authenticated. |
public isInactive ( string $app ) : boolean | ||
$app | string | The application to check. |
Résultat | boolean | True if inactive. |
public linkByPackage ( string $app, string $call, array $args = [], mixed $extra = '' ) : string | ||
$app | string | The application being called. |
$call | string | The method to link to. |
$args | array | Arguments to the method. |
$extra | mixed | Extra, non-standard arguments to the method. |
Résultat | string | The link for that method. |
public listAllApps ( ) : array | ||
Résultat | array | List of all apps registered with Horde. |
public listApps ( array $filter = null, boolean $assoc = false, integer $perms = Horde_Perms::SHOW ) : array | ||
$filter | array | An array of the statuses that should be returned. Defaults to non-hidden. |
$assoc | boolean | Return hash with app names as keys and config parameters as values? |
$perms | integer | The permission level to check for in the list. If null, skips permission check. |
Résultat | array | List of apps registered with Horde. If no applications are defined returns an empty array. |
public listMethods ( string $api = null ) : array | ||
$api | string | Defines the API for which the methods shall be returned. If null, returns all methods. |
Résultat | array | The method list. |
public passwordChangeRequested ( ) : boolean | ||
Résultat | boolean | Whether the backend requested a password change. |
public preferredLang ( string $lang = null ) : string | ||
$lang | string | Force to use this language. |
Résultat | string | The selected language abbreviation. |
public pushApp ( string $app, array $options = [] ) : boolean | ||
$app | string | The name of the application to push. |
$options | array | 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 |
Résultat | boolean | Whether or not the _appStack was modified. |
public remoteHost ( ) : object | ||
Résultat | 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. |
public removeUser ( string $userId ) | ||
$userId | string | The userId to delete. |
public removeUserData ( string $user, string $app = null ) | ||
$user | string | The user ID to delete. |
$app | string | If set, only removes data from this application. By default, removes data from all apps. |
public setAuth ( string $authId, array $credentials, array $options = [] ) | ||
$authId | string | The userId that has been authorized. |
$credentials | array | The credentials of the user. |
$options | array | 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 |
public setAuthCredential ( mixed $credential, string $value = null, string $app = null ) | ||
$credential | mixed | The credential to set. If an array, overwrites the current credentials array. |
$value | string | The value to set the credential to. If $credential is an array, this value is ignored. |
$app | string | The app to update. Defaults to Horde. |
public setAuthenticationSetting ( string $authentication ) | ||
$authentication | string | The authentication setting. |
public setLanguage ( string $lang = null ) : string | ||
$lang | string | The language abbreviation. |
Résultat | string | The current language (since 2.5.0). |
public setLanguageEnvironment ( string $lang = null, string $app = null ) | ||
$lang | string | The new language. |
$app | string | The application for reloading the gettext catalog. Uses current application if null. |
public setTextdomain ( string $app, string $directory ) | ||
$app | string | The application name. |
$directory | string | The directory where the application's LC_MESSAGES directory resides. |
public showService ( string $type ) : boolean | ||
$type | string | 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' |
Résultat | boolean | True if the link is to be shown. |
protected array $_appStack | ||
Résultat | array |
protected array $_appsInit | ||
Résultat | array |
protected array $_args | ||
Résultat | array |
protected int $_regmtime | ||
Résultat | integer |
public array $applications | ||
Résultat | array |
public Exception $authException | ||
Résultat | Exception |
public bool $hordeInit | ||
Résultat | boolean |
public string $initialApp | ||
Résultat | string |
public Horde_Registry_Nlsconfig $nlsconfig | ||
Résultat | Horde_Registry_Nlsconfig |
public string $vhost | ||
Résultat | string |