Class Horde_Permission

Description

Horde_Permission

Instance of a single permissioning object.

Located in /Perms/Perms.php (line 512)


	
			
Direct descendents
Class Description
 class Horde_Permission_Kolab The Horde_Permission_Kolab provides a bridge between Horde Permission handling and the IMAP permission system used on the Kolab server.
 class SQLObject_Permission Extension of the Horde_Permission class for storing permission information in the SQL driver.
Method Summary
 Horde_Permission Horde_Permission (string $name, [string $type = 'matrix'], [array $params = null])
 void addCreatorPermission (constant $permission, [boolean $update = true])
 void addDefaultPermission (constant $permission, [boolean $update = true])
 void addGroupPermission (integer $groupId, constant $permission, [boolean $update = true])
 void addGuestPermission (constant $permission, [boolean $update = true])
 void addUserPermission (string $user, constant $permission, [boolean $update = true])
 mixed get (string $attribute)
 void getData ()
 array getGroupPermissions ([integer $perm = null])
 integer getGuestPermissions ()
 void getName ()
 array getUserPermissions ([integer $perm = null])
 void removeCreatorPermission (constant $permission, [boolean $update = true])
 void removeDefaultPermission (constant $permission, [boolean $update = true])
 void removeGroupPermission (integer $groupId, constant $permission, [boolean $update = true])
 void removeGuestPermission (constant $permission, [boolean $update = true])
 void removeUserPermission (string $user, constant $permission, [boolean $update = true])
 void setData ( $data, string $id)
 void setName (string $name)
 void setPerm ( $permId,  $permission, [ $update = true])
 void unsetPerm ( $permId,  $permission, [ $update = true])
 void updatePermissions (array $perms)
Methods
Constructor Horde_Permission (line 522)

The Horde_Permission constructor.

Horde_Permission Horde_Permission (string $name, [string $type = 'matrix'], [array $params = null])
  • string $name: The name of the perm.
  • string $type: The permission type.
  • array $params: A hash with any parameters that the permission type needs.
addCreatorPermission (line 792)

Grants creators additional permissions to this object.

void addCreatorPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to add.
  • boolean $update: Whether to automatically update the backend.
addDefaultPermission (line 813)

Grants additional default permissions to this object.

void addDefaultPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to add.
  • boolean $update: Whether to automatically update the backend.
addGroupPermission (line 836)

Grants a group additional permissions to this object.

void addGroupPermission (integer $groupId, constant $permission, [boolean $update = true])
  • integer $groupId: The id of the group to grant additional permissions to.
  • constant $permission: The permission (PERMS_DELETE, etc.) to add.
  • boolean $update: Whether to automatically update the backend.
addGuestPermission (line 771)

Grants guests additional permissions to this object.

void addGuestPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to add.
  • boolean $update: Whether to automatically update the backend.
addUserPermission (line 747)

Grants a user additional permissions to this object.

void addUserPermission (string $user, constant $permission, [boolean $update = true])
  • string $user: The user to grant additional permissions to.
  • constant $permission: The permission (PERMS_DELETE, etc.) to add.
  • boolean $update: Whether to automatically update the backend.
get (line 537)

Gets one of the attributes of the object, or null if it isn't defined.

  • return: The value of the attribute, or null.
mixed get (string $attribute)
  • string $attribute: The attribute to get.

Redefined in descendants as:
getCreatorPermissions (line 1038)

Returns the creator permissions on this object.

  • return: The creator permissions on this object.
integer getCreatorPermissions ()
getData (line 571)

Get permission details

void getData ()
getDefaultPermissions (line 1050)

Returns the default permissions on this object.

  • return: The default permissions on this object.
integer getDefaultPermissions ()
getGroupPermissions (line 1065)

Returns an array of all group permissions on this object.

  • return: All group permissions for this object, indexed by group.
array getGroupPermissions ([integer $perm = null])
  • integer $perm: List only users with this permission level. Defaults to all users.
getGuestPermissions (line 1026)

Returns the guest permissions on this object.

  • return: The guest permissions on this object.
integer getGuestPermissions ()
getName (line 553)

Get permission name

void getName ()
getUserPermissions (line 1004)

Returns an array of all user permissions on this object.

  • return: All user permissions for this object, indexed by user.
array getUserPermissions ([integer $perm = null])
  • integer $perm: List only users with this permission level. Defaults to all users.
removeCreatorPermission (line 918)

Removes a permission that creators currently have on this object.

void removeCreatorPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to remove.
  • boolean $update: Whether to automatically update the backend.
removeDefaultPermission (line 945)

Removes a default permission on this object.

void removeDefaultPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to remove.
  • boolean $update: Whether to automatically update the backend.
removeGroupPermission (line 974)

Removes a permission that a group currently has on this object.

void removeGroupPermission (integer $groupId, constant $permission, [boolean $update = true])
  • integer $groupId: The id of the group to remove the permission from.
  • constant $permission: The permission (PERMS_DELETE, etc.) to remove.
  • boolean $update: Whether to automatically update the backend.
removeGuestPermission (line 891)

Removes a permission that guests currently have on this object.

void removeGuestPermission (constant $permission, [boolean $update = true])
  • constant $permission: The permission (PERMS_DELETE, etc.) to remove.
  • boolean $update: Whether to automatically update the backend.
removeUserPermission (line 863)

Removes a permission that a user currently has on this object.

void removeUserPermission (string $user, constant $permission, [boolean $update = true])
  • string $user: The user to remove the permission from.
  • constant $permission: The permission (PERMS_DELETE, etc.) to remove.
  • boolean $update: Whether to automatically update the backend.
setData (line 581)

Set permission id

void setData ( $data, string $id)
  • string $id: Permission ID
  • $data
setName (line 563)

Set permission name

void setName (string $name)
  • string $name: Permission name
setPerm (line 670)

FIXME: needs docs

void setPerm ( $permId,  $permission, [ $update = true])
  • $permId
  • $permission
  • $update
unsetPerm (line 699)

FIXME: needs docs

void unsetPerm ( $permId,  $permission, [ $update = true])
  • $permId
  • $permission
  • $update
updatePermissions (line 592)

Updates the permissions based on data passed in the array.

void updatePermissions (array $perms)
  • array $perms: An array containing the permissions which are to be updated.

Documentation generated on Sun, 30 Jan 2011 05:20:31 +0000 by phpDocumentor 1.4.3