Overview

Packages

  • Perms

Classes

  • Horde_Perms
  • Horde_Perms_Base
  • Horde_Perms_Datatree
  • Horde_Perms_Exception
  • Horde_Perms_Null
  • Horde_Perms_Permission
  • Horde_Perms_Permission_Datatree
  • Horde_Perms_Permission_Kolab
  • Horde_Perms_Permission_Kolab_Acl
  • Horde_Perms_Permission_Kolab_Acl_Anonymous
  • Horde_Perms_Permission_Kolab_Acl_Anyone
  • Horde_Perms_Permission_Kolab_Acl_Creator
  • Horde_Perms_Permission_Kolab_Acl_Group
  • Horde_Perms_Permission_Kolab_Acl_User
  • Horde_Perms_Permission_Kolab_AclIterator
  • Horde_Perms_Permission_Kolab_Element
  • Horde_Perms_Permission_Kolab_Element_Creator
  • Horde_Perms_Permission_Kolab_Element_Default
  • Horde_Perms_Permission_Kolab_Element_Group
  • Horde_Perms_Permission_Kolab_Element_Guest
  • Horde_Perms_Permission_Kolab_Element_User
  • Horde_Perms_Permission_Kolab_ElementIterator
  • Horde_Perms_Permission_Sql
  • Horde_Perms_Sql
  • Horde_Perms_Translation

Interfaces

  • Horde_Perms_Permission_Kolab_Storage
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Perms_Permission

Instance of a single permissioning object.

Copyright 2009-2012 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.

Direct known subclasses

Horde_Perms_Permission_Kolab, Horde_Perms_Permission_Sql
Package: Perms
Category: Horde
Author: Chuck Hagenbuch chuck@horde.org
Author: Jan Schneider jan@horde.org
Located at Horde/Perms/Permission.php
Methods summary
public
# __construct( string $name, integer $cacheVersion = null, string $type = 'matrix', array $params = null )

Constructor.

Constructor.

Parameters

$name
The name of the perm.
$cacheVersion
The revision number of the class.
$type
The permission type.
$params
<p>A hash with any parameters that the permission type needs.</p>
public
# setCacheVersion( integer $cacheVersion )

Sets the revision number of the class.

Sets the revision number of the class.

Parameters

$cacheVersion
The revision number of the class.
public mixed
# get( string $attribute )

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

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

Parameters

$attribute
The attribute to get.

Returns

mixed
The value of the attribute, or null.
public string
# getName( )

Get permission name.

Get permission name.

Returns

string
Permission name.
public
# setName( string $name )

Set permission name

Set permission name

Parameters

$name
Permission name.
public array
# getData( )

Get permission details.

Get permission details.

Returns

array
Permission details.
public
# setData( string $data )

Set permission details.

Set permission details.

Parameters

$data
Permission details.
public
# updatePermissions( array $perms )

Updates the permissions based on data passed in the array.

Updates the permissions based on data passed in the array.

Parameters

$perms
<p>An array containing the permissions which are to be updated.</p>
public
# setPerm( mixed $permId, mixed $permission, mixed $update = true )

TODO

TODO

public
# unsetPerm( mixed $permId, mixed $permission, mixed $update = true )

TODO

TODO

public
# addUserPermission( string $user, integer $permission, boolean $update = true )

Grants a user additional permissions to this object.

Grants a user additional permissions to this object.

Parameters

$user
<p>$uer The user to grant additional permissions to.</p>
$permission
The permission (DELETE, etc.) to add.
$update
<p>Whether to automatically update the backend.</p>
public
# addGuestPermission( integer $permission, boolean $update = true )

Grants guests additional permissions to this object.

Grants guests additional permissions to this object.

Parameters

$permission
The permission (DELETE, etc.) to add.
$update
<p>Whether to automatically update the backend.</p>
public
# addCreatorPermission( integer $permission, boolean $update = true )

Grants creators additional permissions to this object.

Grants creators additional permissions to this object.

Parameters

$permission
The permission (DELETE, etc.) to add.
$update
<p>Whether to automatically update the backend.</p>
public
# addDefaultPermission( integer $permission, boolean $update = true )

Grants additional default permissions to this object.

Grants additional default permissions to this object.

Parameters

$permission
The permission (DELETE, etc.) to add.
$update
<p>Whether to automatically update the backend.</p>
public
# addGroupPermission( integer $groupId, integer $permission, boolean $update = true )

Grants a group additional permissions to this object.

Grants a group additional permissions to this object.

Parameters

$groupId
<p>The id of the group to grant additional permissions to.</p>
$permission
The permission (DELETE, etc.) to add.
$update
<p>Whether to automatically update the backend.</p>
public
# removeUserPermission( string $user = null, integer $permission = null, boolean $update = true )

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

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

Parameters

$user
<p>The user to remove the permission from. Defaults to all users.</p>
$permission
<p>The permission (DELETE, etc.) to remove. Defaults to all permissions.</p>
$update
<p>Whether to automatically update the backend.</p>
public
# removeGuestPermission( integer $permission = null, boolean $update = true )

Removes a permission that guests currently have on this object.

Removes a permission that guests currently have on this object.

Parameters

$permission
<p>The permission (DELETE, etc.) to remove. Defaults to all permissions.</p>
$update
<p>Whether to automatically update the backend.</p>
public
# removeCreatorPermission( integer $permission = null, boolean $update = true )

Removes a permission that creators currently have on this object.

Removes a permission that creators currently have on this object.

Parameters

$permission
<p>The permission (DELETE, etc.) to remove. Defaults to all permissions.</p>
$update
<p>Whether to automatically update the backend.</p>
public
# removeDefaultPermission( integer $permission = null, boolean $update = true )

Removes a default permission on this object.

Removes a default permission on this object.

Parameters

$permission
<p>The permission (DELETE, etc.) to remove. Defaults to all permissions.</p>
$update
<p>Whether to automatically update the backend.</p>
public
# removeGroupPermission( integer $groupId = null, integer $permission = null, boolean $update = true )

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

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

Parameters

$groupId
<p>The id of the group to remove the permission from. Defaults to all groups.</p>
$permission
<p>The permission (DELETE, etc.) to remove. Defaults to all permissions.</p>
$update
<p>Whether to automatically update the backend.</p>
public array
# getUserPermissions( integer $perm = null )

Returns an array of all user permissions on this object.

Returns an array of all user permissions on this object.

Parameters

$perm
<p>List only users with this permission level. Defaults to all users.</p>

Returns

array
All user permissions for this object, indexed by user.
public integer
# getGuestPermissions( )

Returns the guest permissions on this object.

Returns the guest permissions on this object.

Returns

integer
The guest permissions on this object.
public integer
# getCreatorPermissions( )

Returns the creator permissions on this object.

Returns the creator permissions on this object.

Returns

integer
The creator permissions on this object.
public integer
# getDefaultPermissions( )

Returns the default permissions on this object.

Returns the default permissions on this object.

Returns

integer
The default permissions on this object.
public array
# getGroupPermissions( integer $perm = null )

Returns an array of all group permissions on this object.

Returns an array of all group permissions on this object.

Parameters

$perm
<p>List only users with this permission level. Defaults to all users.</p>

Returns

array
All group permissions for this object, indexed by group.
public
# save( )

TODO

TODO

Properties summary
public mixed $data

TODO

TODO

#
public mixed $name

TODO

TODO

#
API documentation generated by ApiGen