PHP Класс Horde_Registry_Application, horde

Copyright 2009-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Michael Slusarz ([email protected])
Наследование: implements Horde_Shutdown_Task
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$auth array The full capability list can be found in Horde_Core_Auth_Application.
$features array List of features supported by this application.
$initParams array The init params used.
$version string The application's version.

Защищенные свойства (Protected)

Свойство Тип Описание
$_app string Application identifier.
$_sessVars array Cached values to add to the session after authentication.

Открытые методы

Метод Описание
__construct ( string $app ) Constructor.
appInitFailure ( Horde_Exception_PushApp $e ) Application-specific code to run if application auth fails.
authAddUser ( string $userId, array $credentials ) Adds a user defined by authentication credentials.
authAuthenticate ( string $userId, array $credentials ) Tries to authenticate with the server and create a session.
authLoginParams ( ) : array Return login parameters used on the login page.
authRemoveUser ( string $userId ) Deletes a user defined by authentication credentials.
authResetPassword ( string $userId ) : string Reset a user's password.
authTransparent ( Horde_Core_Auth_Application $auth_ob ) : boolean Tries to transparently authenticate with the server and create a session.
authUpdateUser ( string $oldId, string $newId, array $credentials ) Update an existing user's credentials.
authUserExists ( string $userId ) : boolean Does a user exist?
authUserList ( ) : array Lists all users in the system.
authValidate ( ) : boolean Validates an existing authentication.
authenticated ( ) Code run on successful authentication.
changeLanguage ( ) Code to run if the language preference changes.
configSpecialValues ( string $what ) : array Returns values for configuration settings.
download ( Horde_Variables $vars ) : array Prepare data to deliver to browser for download.
getInitialPage ( ) : mixed Return the initial page to access.
hasPermission ( string $permission, mixed $allowed, array $opts = [] ) : mixed Returns the specified permission for the given app permission.
init ( ) Code run when the application is pushed on the stack for the first time in a page access.
listAlarms ( integer $time, string $user = null ) : array Lists alarms for a given moment.
logout ( ) Tasks to perform at logout.
menu ( Horde_Menu $menu ) Add additional items to the menu.
nosqlDrivers ( ) : array Return a list of NoSQL drivers used in the application.
perms ( ) : array Returns a list of available permissions.
removeUserData ( string $user ) Removes user data.
setupNotification ( Horde_Notification_Handler $handler ) Modifies the global notification handler.
shutdown ( ) Shutdown tasks.
sidebar ( Horde_View_Sidebar $sidebar ) Add additional items to the sidebar.
topbarCreate ( Horde_Tree_Renderer_Base $tree, string $parent = null, array $params = [] ) Add node(s) to the sidebar tree.
updateSessVars ( ) Updates cached session variable information into the active session.

Защищенные методы

Метод Описание
_addSessVars ( array $vars ) Add session variables to the session.
_authenticated ( ) Code to run on successful authentication. This will be called once per session, and the entire Horde framework will be available.
_bootstrap ( ) Bootstrap code for an application. This is run when the application object is being created. The full Horde environment is not available in this method, and the user may not yet be authenticated. Only tasks necessary to setup the base application environment should be done here.
_init ( ) Code run when the application is pushed on the stack for the first time in a page access. The entire Horde framework will be available, but the user may not be authenticated.

Описание методов

__construct() закрытый публичный Метод

Global constants defined: - [APPNAME]_TEMPLATES - (string) Location of template files.
final public __construct ( string $app )
$app string Application identifier.

_addSessVars() закрытый защищенный Метод

Add session variables to the session.
final protected _addSessVars ( array $vars )
$vars array Array of session variables to add to the session, once it becomes available.

_authenticated() защищенный Метод

Code to run on successful authentication. This will be called once per session, and the entire Horde framework will be available.
protected _authenticated ( )

_bootstrap() защищенный Метод

Bootstrap code for an application. This is run when the application object is being created. The full Horde environment is not available in this method, and the user may not yet be authenticated. Only tasks necessary to setup the base application environment should be done here.
protected _bootstrap ( )

_init() защищенный Метод

Code run when the application is pushed on the stack for the first time in a page access. The entire Horde framework will be available, but the user may not be authenticated.
protected _init ( )

appInitFailure() публичный Метод

Called from Horde_Registry::appInit().
public appInitFailure ( Horde_Exception_PushApp $e )
$e Horde_Exception_PushApp The exception object.

authAddUser() публичный Метод

Adds a user defined by authentication credentials.
public authAddUser ( string $userId, array $credentials )
$userId string The user ID to add.
$credentials array An array of login credentials.

authAuthenticate() публичный Метод

Any session variables you want added should be set by calling _addSessVars() internally within this method.
public authAuthenticate ( string $userId, array $credentials )
$userId string The username of the user.
$credentials array Credentials of the user.

authLoginParams() публичный Метод

Return login parameters used on the login page.
public authLoginParams ( ) : array
Результат array See Horde_Core_Auth_Application#authLoginParams().

authRemoveUser() публичный Метод

Deletes a user defined by authentication credentials.
public authRemoveUser ( string $userId )
$userId string The user ID to delete.

authResetPassword() публичный Метод

Reset a user's password.
public authResetPassword ( string $userId ) : string
$userId string The user id for which to reset the password.
Результат string The new password.

authTransparent() публичный Метод

Any session variables you want added should be set by calling _addSessVars() internally within this method.
public authTransparent ( Horde_Core_Auth_Application $auth_ob ) : boolean
$auth_ob Horde_Core_Auth_Application The authentication object.
Результат boolean Whether transparent login is supported.

authUpdateUser() публичный Метод

Update an existing user's credentials.
public authUpdateUser ( string $oldId, string $newId, array $credentials )
$oldId string The old user ID.
$newId string The new user ID.
$credentials array The new login credentials.

authUserExists() публичный Метод

Does a user exist?
public authUserExists ( string $userId ) : boolean
$userId string The user ID to check.
Результат boolean True if the user exists.

authUserList() публичный Метод

Lists all users in the system.
public authUserList ( ) : array
Результат array The array of user IDs.

authValidate() публичный Метод

Validates an existing authentication.
public authValidate ( ) : boolean
Результат boolean Whether the authentication is still valid.

authenticated() закрытый публичный Метод

Code run on successful authentication.
final public authenticated ( )

changeLanguage() публичный Метод

Called only in applications the user is currently authenticated to in the current session.
public changeLanguage ( )

configSpecialValues() публичный Метод

Returns values for configuration settings.
public configSpecialValues ( string $what ) : array
$what string The configuration setting to return.
Результат array The values for the requested configuration setting.

download() публичный Метод

Prepare data to deliver to browser for download.
public download ( Horde_Variables $vars ) : array
$vars Horde_Variables Form variables provided to download script. The filename is available in the 'filename' parameter.
Результат array Download data: - data: [REQUIRED] (mixed) Data. Either a stream or a string. - name: (string) Filename that overrides 'filename' URL parameter. - size: (integer) If set, used as size. If null, no size will be sent to browser. If not set, size will be automatically determined from data. - type: (string) MIME type to send (default: application/octet-stream).

getInitialPage() публичный Метод

Return the initial page to access.
С версии: 2.12.0
public getInitialPage ( ) : mixed
Результат mixed URL of the initial page, or null to use Horde defaults.

hasPermission() публичный Метод

Returns the specified permission for the given app permission.
public hasPermission ( string $permission, mixed $allowed, array $opts = [] ) : mixed
$permission string The permission to check.
$allowed mixed The allowed permissions.
$opts array Additional options ('value').
Результат mixed The value of the specified permission.

init() закрытый публичный Метод

Code run when the application is pushed on the stack for the first time in a page access.
final public init ( )

listAlarms() публичный Метод

Lists alarms for a given moment.
public listAlarms ( integer $time, string $user = null ) : array
$time integer The time to retrieve alarms for.
$user string The user to retreive alarms for. All users if null.
Результат array An array of UIDs.

logout() публичный Метод

Tasks to perform at logout.
public logout ( )

menu() публичный Метод

Add additional items to the menu.
public menu ( Horde_Menu $menu )
$menu Horde_Menu The menu object.

nosqlDrivers() публичный Метод

Return a list of NoSQL drivers used in the application.
С версии: 2.5.0
public nosqlDrivers ( ) : array
Результат array Array of NoSQL drivers.

perms() публичный Метод

Returns a list of available permissions.
public perms ( ) : array
Результат array An array describing all available permissions.

removeUserData() публичный Метод

Removes user data.
public removeUserData ( string $user )
$user string Name of user to remove data for.

setupNotification() публичный Метод

Modifies the global notification handler.
public setupNotification ( Horde_Notification_Handler $handler )
$handler Horde_Notification_Handler A notification handler.

shutdown() публичный Метод

Shutdown tasks.
public shutdown ( )

sidebar() публичный Метод

Add additional items to the sidebar.
public sidebar ( Horde_View_Sidebar $sidebar )
$sidebar Horde_View_Sidebar The sidebar object.

topbarCreate() публичный Метод

Add node(s) to the sidebar tree.
public topbarCreate ( Horde_Tree_Renderer_Base $tree, string $parent = null, array $params = [] )
$tree Horde_Tree_Renderer_Base Tree object.
$parent string The current parent element.
$params array Additional parameters.

updateSessVars() закрытый публичный Метод

Updates cached session variable information into the active session.
final public updateSessVars ( )

Описание свойств

$_app защищенное свойство

Application identifier.
protected string $_app
Результат string

$_sessVars защищенное свойство

Cached values to add to the session after authentication.
protected array $_sessVars
Результат array

$auth публичное свойство

The full capability list can be found in Horde_Core_Auth_Application.
public array $auth
Результат array

$features публичное свойство

List of features supported by this application.
public array $features
Результат array

$initParams публичное свойство

The init params used.
public array $initParams
Результат array

$version публичное свойство

The application's version.
public string $version
Результат string