PHP Класс Horde_Api, horde

This file defines Horde's external API interface. Other applications can interact with Horde through this API.
Наследование: extends Horde_Registry_Api
Показать файл Открыть проект

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

Метод Описание
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.

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

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

Adds a group to the groups system.
public addGroup ( string $name ) : mixed
$name string The group's name.
Результат mixed The group's ID.

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

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() публичный Метод

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() публичный Метод

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() публичный Метод

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() публичный Метод

Returns a list of adminstrative links.
public admin_list ( ) : array
Результат 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() публичный Метод

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.
Результат string The block content.

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

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.
Результат string The block title.

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

Returns a pretty printed list of all available blocks.
public blocks ( ) : array
Результат array A hash with block IDs as keys and application plus block block names as values.

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

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.
Результат string The value of the preference, null if it doesn't exist.

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

Returns all available registry APIs.
public listAPIs ( ) : array
Результат array The API list.

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

Returns a list of ActiveSync devices that are partnered with Horde.
С версии: 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).
Результат array List of device properties.

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

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.
Результат array List of apps registered with Horde. If no applications are defined returns an empty array.

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

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.
Результат array All group permissions for this share.

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

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).
Результат array List of groups with the specified permissions.

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

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.
Результат array The list of shares.

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

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.
Результат array All user permissions for this share.

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

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.
Результат array The user list.

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

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).
Результат array List of users with the specified permissions.

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

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.
Результат boolean

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

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.
Результат boolean

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

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

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

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() публичный Метод

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() публичный Метод

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() публичный Метод

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

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

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() публичный Метод

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.