PHP Class Horde_Api, horde

This file defines Horde's external API interface. Other applications can interact with Horde through this API.
Inheritance: extends Horde_Registry_Api
Afficher le fichier Open project: horde/horde

Méthodes publiques

Méthode Description
addGroup ( string $name ) : mixed Adds a group to the groups system.
addGroupPermissions ( string $scope, string $shareName, mixed $groupId, array $permissions ) Gives a group certain privileges for a share.
addShare ( string $scope, string $shareName, string $shareTitle, string $userName ) Adds a share to the shares system.
addUserPermissions ( string $scope, string $shareName, string $userName, array $permissions ) Gives a user certain privileges for a share.
addUserToGroup ( mixed $group, string $user ) Adds a user to a group.
admin_list ( ) : array Returns a list of adminstrative links.
blockContent ( string $app, string $name, array $params = [] ) : string Returns a Horde_Block's content.
blockTitle ( string $app, string $name, array $params = [] ) : string Returns a Horde_Block's title.
blocks ( ) : array Returns a pretty printed list of all available blocks.
getPreference ( string $app, string $pref ) : string Returns the value of the requested preference.
listAPIs ( ) : array Returns all available registry APIs.
listActiveSyncDevices ( array $filter = [] ) : array Returns a list of ActiveSync devices that are partnered with Horde.
listApps ( array $filter = null ) : array Returns a list of the installed and registered applications.
listGroupPermissions ( string $scope, string $shareName, string $groupName ) : array Returns an array of all group permissions on a share.
listGroupsOfShare ( string $scope, string $shareName, array $permissions ) : array Returns a list of groups which have have certain permissions on a share.
listSharesOfOwner ( string $scope, string $userName ) : array Returns an array of all shares that $userName is the owner of.
listUserPermissions ( string $scope, string $shareName, string $userName ) : array Returns an array of all user permissions on a share.
listUsersOfGroup ( mixed $group ) : array Returns a list of users that are part of this group (and only this group).
listUsersOfShare ( string $scope, string $shareName, array $permissions ) : array Returns a list of users which have have certain permissions on a share.
performActiveSyncDeviceAction ( string $action, string $deviceid, string $user = null ) : boolean Perform an administrative action on a single paired ActiveSync device.
performBulkActiveSyncDeviceAction ( string $action ) : boolean Perform an admistrative action on ALL paired ActiveSync devices.
removeGroup ( mixed $group ) Removes a group from the groups system.
removeGroupPermissions ( string $scope, string $shareName, mixed $groupId ) Removes a group from a share.
removeShare ( string $scope, string $shareName ) Removes a share from the shares system permanently.
removeUserData ( string $user, string $app = false ) Removes user data.
removeUserFromGroup ( mixed $group, string $user ) Removes a user from a group.
removeUserPermissions ( string $scope, string $shareName, string $userName ) Removes a user from a share.
setPreference ( string $app, string $pref, $value ) Sets a preference to the specified value, if the preference is allowed to be modified.

Method Details

addGroup() public méthode

Adds a group to the groups system.
public addGroup ( string $name ) : mixed
$name string The group's name.
Résultat mixed The group's ID.

addGroupPermissions() public méthode

Gives a group certain privileges for a share.
public addGroupPermissions ( string $scope, string $shareName, mixed $groupId, array $permissions )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$groupId mixed The group ID.
$permissions array A list of permissions (show, read, edit, delete).

addShare() public méthode

Adds a share to the shares system.
public addShare ( string $scope, string $shareName, string $shareTitle, string $userName )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$shareTitle string The share's human readable title.
$userName string The share's owner.

addUserPermissions() public méthode

Gives a user certain privileges for a share.
public addUserPermissions ( string $scope, string $shareName, string $userName, array $permissions )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$userName string The user's name.
$permissions array A list of permissions (show, read, edit, delete).

addUserToGroup() public méthode

Adds a user to a group.
public addUserToGroup ( mixed $group, string $user )
$group mixed The group ID.
$user string The user to add.

admin_list() public méthode

Returns a list of adminstrative links.
public admin_list ( ) : array
Résultat array Keys are link labels, values are array with these keys: - icon: (string) Graphic for page. - link: (string) Registry encoded link to page. - name: (string) Gettext label for page.

blockContent() public méthode

Returns a Horde_Block's content.
public blockContent ( string $app, string $name, array $params = [] ) : string
$app string The block application name.
$name string The block name (NOT the classname).
$params array Block parameters.
Résultat string The block content.

blockTitle() public méthode

Returns a Horde_Block's title.
public blockTitle ( string $app, string $name, array $params = [] ) : string
$app string The block application name.
$name string The block name (NOT the class name).
$params array Block parameters.
Résultat string The block title.

blocks() public méthode

Returns a pretty printed list of all available blocks.
public blocks ( ) : array
Résultat array A hash with block IDs as keys and application plus block block names as values.

getPreference() public méthode

Returns the value of the requested preference.
public getPreference ( string $app, string $pref ) : string
$app string The application of the preference to retrieve.
$pref string The name of the preference to retrieve.
Résultat string The value of the preference, null if it doesn't exist.

listAPIs() public méthode

Returns all available registry APIs.
public listAPIs ( ) : array
Résultat array The API list.

listActiveSyncDevices() public méthode

Returns a list of ActiveSync devices that are partnered with Horde.
Since: 5.2.0
public listActiveSyncDevices ( array $filter = [] ) : array
$filter array An array of parameters to filter on: - user: Only return devices owned by user. If not present will default to returning devices for current user only. If present, but empty and current user is admin, will return all devices. Otherwise, will return devices matching the parameter (must be admin to list users other than current).
Résultat array List of device properties.

listApps() public méthode

Returns a list of the installed and registered applications.
public listApps ( array $filter = null ) : array
$filter array An array of the statuses that should be returned. Defaults to non-hidden.
Résultat array List of apps registered with Horde. If no applications are defined returns an empty array.

listGroupPermissions() public méthode

Returns an array of all group permissions on a share.
public listGroupPermissions ( string $scope, string $shareName, string $groupName ) : array
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$groupName string The group's name.
Résultat array All group permissions for this share.

listGroupsOfShare() public méthode

Returns a list of groups which have have certain permissions on a share.
public listGroupsOfShare ( string $scope, string $shareName, array $permissions ) : array
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$permissions array A list of permissions (show, read, edit, delete).
Résultat array List of groups with the specified permissions.

listSharesOfOwner() public méthode

Returns an array of all shares that $userName is the owner of.
public listSharesOfOwner ( string $scope, string $userName ) : array
$scope string The name of the share root, e.g. the application that the share belongs to.
$userName string The share's owner.
Résultat array The list of shares.

listUserPermissions() public méthode

Returns an array of all user permissions on a share.
public listUserPermissions ( string $scope, string $shareName, string $userName ) : array
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$userName string The user's name.
Résultat array All user permissions for this share.

listUsersOfGroup() public méthode

Returns a list of users that are part of this group (and only this group).
public listUsersOfGroup ( mixed $group ) : array
$group mixed The group ID.
Résultat array The user list.

listUsersOfShare() public méthode

Returns a list of users which have have certain permissions on a share.
public listUsersOfShare ( string $scope, string $shareName, array $permissions ) : array
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$permissions array A list of permissions (show, read, edit, delete).
Résultat array List of users with the specified permissions.

performActiveSyncDeviceAction() public méthode

Perform an administrative action on a single paired ActiveSync device.
public performActiveSyncDeviceAction ( string $action, string $deviceid, string $user = null ) : boolean
$action string The action to perform. One of: WIPE, CANCEL_WIPE, REMOVE.
$deviceid string The device's deviceid.
$user string Restrict actions to only this user's account on the device in the case where the device may have multiple user accounts on this server. If empty, all users' state information will be removed. If a non-admin calls this method, this will always be set to the current horde username.
Résultat boolean

performBulkActiveSyncDeviceAction() public méthode

Perform an admistrative action on ALL paired ActiveSync devices.
public performBulkActiveSyncDeviceAction ( string $action ) : boolean
$action string The action. Currently, only 'RESET' is supported. - 'RESET': Causes all state for all devices to be removed. I.e., sets the synckey for all devices to 0.
Résultat boolean

removeGroup() public méthode

Removes a group from the groups system.
public removeGroup ( mixed $group )
$group mixed The group ID.

removeGroupPermissions() public méthode

Removes a group from a share.
public removeGroupPermissions ( string $scope, string $shareName, mixed $groupId )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$groupId mixed The group ID.

removeShare() public méthode

Removes a share from the shares system permanently.
public removeShare ( string $scope, string $shareName )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.

removeUserData() public méthode

Removes user data.
public removeUserData ( string $user, string $app = false )
$user string Name of user to remove data for.
$app string Remove data from this application. If boolean true, removes all applications. If boolean false, removes only base Horde data.

removeUserFromGroup() public méthode

Removes a user from a group.
public removeUserFromGroup ( mixed $group, string $user )
$group mixed The group ID.
$user string The user to add.

removeUserPermissions() public méthode

Removes a user from a share.
public removeUserPermissions ( string $scope, string $shareName, string $userName )
$scope string The name of the share root, e.g. the application that the share belongs to.
$shareName string The share's name.
$userName string The user's name.

setPreference() public méthode

Sets a preference to the specified value, if the preference is allowed to be modified.
public setPreference ( string $app, string $pref, $value )
$app string The application of the preference to modify.
$pref string The name of the preference to modify.