Horde_Api
extends Horde_Registry_Api
in package
Horde external API interface.
This file defines Horde's external API interface. Other applications can interact with Horde through this API.
Tags
Table of Contents
- addGroup() : mixed
- Adds a group to the groups system.
- addGroupPermissions() : mixed
- Gives a group certain privileges for a share.
- addShare() : mixed
- Adds a share to the shares system.
- addUserPermissions() : mixed
- Gives a user certain privileges for a share.
- addUserToGroup() : mixed
- Adds a user to a group.
- admin_list() : array<string|int, mixed>
- Returns a list of adminstrative links.
- blockContent() : string
- Returns a Horde_Block's content.
- blocks() : array<string|int, mixed>
- Returns a pretty printed list of all available blocks.
- blockTitle() : string
- Returns a Horde_Block's title.
- getPreference() : string
- Returns the value of the requested preference.
- listActiveSyncDevices() : array<string|int, mixed>
- Returns a list of ActiveSync devices that are partnered with Horde.
- listAPIs() : array<string|int, mixed>
- Returns all available registry APIs.
- listApps() : array<string|int, mixed>
- Returns a list of the installed and registered applications.
- listGroupPermissions() : array<string|int, mixed>
- Returns an array of all group permissions on a share.
- listGroupsOfShare() : array<string|int, mixed>
- Returns a list of groups which have have certain permissions on a share.
- listSharesOfOwner() : array<string|int, mixed>
- Returns an array of all shares that $userName is the owner of.
- listUserPermissions() : array<string|int, mixed>
- Returns an array of all user permissions on a share.
- listUsersOfGroup() : array<string|int, mixed>
- Returns a list of users that are part of this group (and only this group).
- listUsersOfShare() : array<string|int, mixed>
- Returns a list of users which have have certain permissions on a share.
- performActiveSyncDeviceAction() : bool
- Perform an administrative action on a single paired ActiveSync device.
- performBulkActiveSyncDeviceAction() : bool
- Perform an admistrative action on ALL paired ActiveSync devices.
- removeGroup() : mixed
- Removes a group from the groups system.
- removeGroupPermissions() : mixed
- Removes a group from a share.
- removeShare() : mixed
- Removes a share from the shares system permanently.
- removeUserData() : mixed
- Removes user data.
- removeUserFromGroup() : mixed
- Removes a user from a group.
- removeUserPermissions() : mixed
- Removes a user from a share.
- setPreference() : mixed
- Sets a preference to the specified value, if the preference is allowed to be modified.
Methods
addGroup()
Adds a group to the groups system.
public
addGroup(string $name) : mixed
Parameters
- $name : string
-
The group's name.
Tags
Return values
mixed —The group's ID.
addGroupPermissions()
Gives a group certain privileges for a share.
public
addGroupPermissions(string $scope, string $shareName, mixed $groupId, array<string|int, mixed> $permissions) : mixed
Parameters
- $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<string|int, mixed>
-
A list of permissions (show, read, edit, delete).
Tags
Return values
mixed —addShare()
Adds a share to the shares system.
public
addShare(string $scope, string $shareName, string $shareTitle, string $userName) : mixed
Parameters
- $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.
Tags
Return values
mixed —addUserPermissions()
Gives a user certain privileges for a share.
public
addUserPermissions(string $scope, string $shareName, string $userName, array<string|int, mixed> $permissions) : mixed
Parameters
- $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<string|int, mixed>
-
A list of permissions (show, read, edit, delete).
Tags
Return values
mixed —addUserToGroup()
Adds a user to a group.
public
addUserToGroup(mixed $group, string $user) : mixed
Parameters
- $group : mixed
-
The group ID.
- $user : string
-
The user to add.
Tags
Return values
mixed —admin_list()
Returns a list of adminstrative links.
public
admin_list() : array<string|int, mixed>
Return values
array<string|int, mixed> —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<string|int, mixed> $params = array() ]) : string
Parameters
- $app : string
-
The block application name.
- $name : string
-
The block name (NOT the classname).
- $params : array<string|int, mixed> = array()
-
Block parameters.
Return values
string —The block content.
blocks()
Returns a pretty printed list of all available blocks.
public
blocks() : array<string|int, mixed>
Return values
array<string|int, mixed> —A hash with block IDs as keys and application plus block block names as values.
blockTitle()
Returns a Horde_Block's title.
public
blockTitle(string $app, string $name[, array<string|int, mixed> $params = array() ]) : string
Parameters
- $app : string
-
The block application name.
- $name : string
-
The block name (NOT the class name).
- $params : array<string|int, mixed> = array()
-
Block parameters.
Return values
string —The block title.
getPreference()
Returns the value of the requested preference.
public
getPreference(string $app, string $pref) : string
Parameters
- $app : string
-
The application of the preference to retrieve.
- $pref : string
-
The name of the preference to retrieve.
Return values
string —The value of the preference, null if it doesn't exist.
listActiveSyncDevices()
Returns a list of ActiveSync devices that are partnered with Horde.
public
listActiveSyncDevices([array<string|int, mixed> $filter = array() ]) : array<string|int, mixed>
Parameters
- $filter : array<string|int, mixed> = 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).
Tags
Return values
array<string|int, mixed> —List of device properties.
listAPIs()
Returns all available registry APIs.
public
listAPIs() : array<string|int, mixed>
Return values
array<string|int, mixed> —The API list.
listApps()
Returns a list of the installed and registered applications.
public
listApps([array<string|int, mixed> $filter = null ]) : array<string|int, mixed>
Parameters
- $filter : array<string|int, mixed> = null
-
An array of the statuses that should be returned. Defaults to non-hidden.
Return values
array<string|int, mixed> —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<string|int, mixed>
Parameters
- $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.
Tags
Return values
array<string|int, mixed> —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<string|int, mixed> $permissions) : array<string|int, mixed>
Parameters
- $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<string|int, mixed>
-
A list of permissions (show, read, edit, delete).
Tags
Return values
array<string|int, mixed> —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<string|int, mixed>
Parameters
- $scope : string
-
The name of the share root, e.g. the application that the share belongs to.
- $userName : string
-
The share's owner.
Tags
Return values
array<string|int, mixed> —The list of shares.
listUserPermissions()
Returns an array of all user permissions on a share.
public
listUserPermissions(string $scope, string $shareName, string $userName) : array<string|int, mixed>
Parameters
- $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.
Tags
Return values
array<string|int, mixed> —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<string|int, mixed>
Parameters
- $group : mixed
-
The group ID.
Tags
Return values
array<string|int, mixed> —The user list.
listUsersOfShare()
Returns a list of users which have have certain permissions on a share.
public
listUsersOfShare(string $scope, string $shareName, array<string|int, mixed> $permissions) : array<string|int, mixed>
Parameters
- $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<string|int, mixed>
-
A list of permissions (show, read, edit, delete).
Tags
Return values
array<string|int, mixed> —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 ]) : bool
Parameters
- $action : string
-
The action to perform. One of: WIPE, CANCEL_WIPE, REMOVE.
- $deviceid : string
-
The device's deviceid.
- $user : string = null
-
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.
Tags
Return values
bool —performBulkActiveSyncDeviceAction()
Perform an admistrative action on ALL paired ActiveSync devices.
public
performBulkActiveSyncDeviceAction(string $action) : bool
Parameters
- $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.
Return values
bool —removeGroup()
Removes a group from the groups system.
public
removeGroup(mixed $group) : mixed
Parameters
- $group : mixed
-
The group ID.
Tags
Return values
mixed —removeGroupPermissions()
Removes a group from a share.
public
removeGroupPermissions(string $scope, string $shareName, mixed $groupId) : mixed
Parameters
- $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.
Tags
Return values
mixed —removeShare()
Removes a share from the shares system permanently.
public
removeShare(string $scope, string $shareName) : mixed
Parameters
- $scope : string
-
The name of the share root, e.g. the application that the share belongs to.
- $shareName : string
-
The share's name.
Tags
Return values
mixed —removeUserData()
Removes user data.
public
removeUserData(string $user[, string $app = false ]) : mixed
Parameters
- $user : string
-
Name of user to remove data for.
- $app : string = false
-
Remove data from this application. If boolean true, removes all applications. If boolean false, removes only base Horde data.
Tags
Return values
mixed —removeUserFromGroup()
Removes a user from a group.
public
removeUserFromGroup(mixed $group, string $user) : mixed
Parameters
- $group : mixed
-
The group ID.
- $user : string
-
The user to add.
Tags
Return values
mixed —removeUserPermissions()
Removes a user from a share.
public
removeUserPermissions(string $scope, string $shareName, string $userName) : mixed
Parameters
- $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.
Tags
Return values
mixed —setPreference()
Sets a preference to the specified value, if the preference is allowed to be modified.
public
setPreference(string $app, string $pref, mixed $value) : mixed
Parameters
- $app : string
-
The application of the preference to modify.
- $pref : string
-
The name of the preference to modify.
- $value : mixed