Horde_Perms_Permission_Kolab
        
        extends Horde_Perms_Permission
    
    
            
            in package
            
        
    
    
    
        
            Maps folder permissions into the Horde_Permission system.
Tags
Table of Contents
- ALL = 'lrid'
 - Kolab ACL speak for all permissions on a shared object.
 - $data : string
 - A cache for the folder acl settings. The cache holds the permissions in horde compatible format, not in the IMAP permission format.
 - $name : mixed
 - TODO
 - $_cacheVersion : int
 - Incrementing version number if cached classes change.
 - $_groups : Horde_Group_Base
 - The group handler.
 - $_storage : Horde_Perms_Permission_Kolab_Storage
 - The Kolab Folder these permissions belong to.
 - __construct() : mixed
 - Constructor.
 - addCreatorPermission() : mixed
 - Grants creators additional permissions to this object.
 - addDefaultPermission() : mixed
 - Grants additional default permissions to this object.
 - addGroupPermission() : mixed
 - Grants a group additional permissions to this object.
 - addGuestPermission() : mixed
 - Grants guests additional permissions to this object.
 - addUserPermission() : mixed
 - Grants a user additional permissions to this object.
 - get() : mixed
 - Gets one of the attributes of the object, or null if it isn't defined.
 - getCreatorPermissions() : int
 - Returns the creator permissions on this object.
 - getCurrentPermissions() : mixed
 - Returns the current permission of the folder and stores the values in the cache.
 - getData() : array<string|int, mixed>
 - Get permission details.
 - getDefaultPermissions() : int
 - Returns the default permissions on this object.
 - getGroupPermissions() : array<string|int, mixed>
 - Returns an array of all group permissions on this object.
 - getGuestPermissions() : int
 - Returns the guest permissions on this object.
 - getName() : string
 - Get permission name.
 - getOwnerPermissions() : int
 - Returns the permissions of the owner on this object.
 - getUserPermissions() : array<string|int, mixed>
 - Returns an array of all user permissions on this object.
 - removeCreatorPermission() : mixed
 - Removes a permission that creators currently have on this object.
 - removeDefaultPermission() : mixed
 - Removes a default permission on this object.
 - removeGroupPermission() : mixed
 - Removes a permission that a group currently has on this object.
 - removeGuestPermission() : mixed
 - Removes a permission that guests currently have on this object.
 - removeUserPermission() : mixed
 - Removes a permission that a user currently has on this object.
 - save() : mixed
 - Saves the current permission values from the cache to the IMAP folder.
 - setCacheVersion() : mixed
 - Sets the revision number of the class.
 - setData() : mixed
 - Set permission details.
 - setName() : mixed
 - Set permission name
 - setPerm() : mixed
 - TODO
 - unsetPerm() : mixed
 - TODO
 - updatePermissions() : mixed
 - Updates the permissions based on data passed in the array.
 
Constants
ALL
Kolab ACL speak for all permissions on a shared object.
    public
        mixed
    ALL
    = 'lrid'
    
        
    
Properties
$data
A cache for the folder acl settings. The cache holds the permissions in horde compatible format, not in the IMAP permission format.
    public
        string
    $data
    
    
    
    
$name
TODO
    public
        mixed
    $name
    
    
        
    
$_cacheVersion
Incrementing version number if cached classes change.
    protected
        int
    $_cacheVersion
    
    
    
    
$_groups
The group handler.
    protected
        Horde_Group_Base
    $_groups
    
    
    
    
$_storage
The Kolab Folder these permissions belong to.
    protected
        Horde_Perms_Permission_Kolab_Storage
    $_storage
    
    
    
    
Methods
__construct()
Constructor.
    public
                    __construct(Horde_Perms_Permission_Kolab_Storage $storage, Horde_Group_Base $groups) : mixed
    
        Parameters
- $storage : Horde_Perms_Permission_Kolab_Storage
 - 
                    
The storage object represented by this permission instance.
 - $groups : Horde_Group_Base
 - 
                    
The group handler.
 
Return values
mixed —addCreatorPermission()
Grants creators additional permissions to this object.
    public
                    addCreatorPermission(int $permission[, bool $update = true ]) : mixed
    
        Parameters
- $permission : int
 - 
                    
The permission (DELETE, etc.) to add.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —addDefaultPermission()
Grants additional default permissions to this object.
    public
                    addDefaultPermission(int $permission[, bool $update = true ]) : mixed
    
        Parameters
- $permission : int
 - 
                    
The permission (DELETE, etc.) to add.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —addGroupPermission()
Grants a group additional permissions to this object.
    public
                    addGroupPermission(int $groupId, int $permission[, bool $update = true ]) : mixed
    
        Parameters
- $groupId : int
 - 
                    
The id of the group to grant additional permissions to.
 - $permission : int
 - 
                    
The permission (DELETE, etc.) to add.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —addGuestPermission()
Grants guests additional permissions to this object.
    public
                    addGuestPermission(int $permission[, bool $update = true ]) : mixed
    
        Parameters
- $permission : int
 - 
                    
The permission (DELETE, etc.) to add.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —addUserPermission()
Grants a user additional permissions to this object.
    public
                    addUserPermission(mixed $user, int $permission[, bool $update = true ]) : mixed
    
        Parameters
- $user : mixed
 - $permission : int
 - 
                    
The permission (DELETE, etc.) to add.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —get()
Gets one of the attributes of the object, or null if it isn't defined.
    public
                    get(string $attribute) : mixed
    
        Parameters
- $attribute : string
 - 
                    
The attribute to get.
 
Return values
mixed —The value of the attribute, or null.
getCreatorPermissions()
Returns the creator permissions on this object.
    public
                    getCreatorPermissions() : int
    
    
    
        Return values
int —The creator permissions on this object.
getCurrentPermissions()
Returns the current permission of the folder and stores the values in the cache.
    public
                    getCurrentPermissions() : mixed
    
    
    
        Return values
mixed —getData()
Get permission details.
    public
                    getData() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —Permission details.
getDefaultPermissions()
Returns the default permissions on this object.
    public
                    getDefaultPermissions() : int
    
    
    
        Return values
int —The default permissions on this object.
getGroupPermissions()
Returns an array of all group permissions on this object.
    public
                    getGroupPermissions([int $perm = null ]) : array<string|int, mixed>
    
        Parameters
- $perm : int = null
 - 
                    
List only users with this permission level. Defaults to all users.
 
Return values
array<string|int, mixed> —All group permissions for this object, indexed by group.
getGuestPermissions()
Returns the guest permissions on this object.
    public
                    getGuestPermissions() : int
    
    
    
        Return values
int —The guest permissions on this object.
getName()
Get permission name.
    public
                    getName() : string
    
    
    
        Return values
string —Permission name.
getOwnerPermissions()
Returns the permissions of the owner on this object.
    public
                    getOwnerPermissions() : int
    
    
    
    Tags
Return values
int —All owner permissions for this object.
getUserPermissions()
Returns an array of all user permissions on this object.
    public
                    getUserPermissions([int $perm = null ]) : array<string|int, mixed>
    
        Parameters
- $perm : int = null
 - 
                    
List only users with this permission level. Defaults to all users.
 
Return values
array<string|int, mixed> —All user permissions for this object, indexed by user.
removeCreatorPermission()
Removes a permission that creators currently have on this object.
    public
                    removeCreatorPermission([int $permission = null ][, bool $update = true ]) : mixed
    
        Parameters
- $permission : int = null
 - 
                    
The permission (DELETE, etc.) to remove. Defaults to all permissions.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —removeDefaultPermission()
Removes a default permission on this object.
    public
                    removeDefaultPermission([int $permission = null ][, bool $update = true ]) : mixed
    
        Parameters
- $permission : int = null
 - 
                    
The permission (DELETE, etc.) to remove. Defaults to all permissions.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —removeGroupPermission()
Removes a permission that a group currently has on this object.
    public
                    removeGroupPermission([int $groupId = null ][, int $permission = null ][, bool $update = true ]) : mixed
    
        Parameters
- $groupId : int = null
 - 
                    
The id of the group to remove the permission from. Defaults to all groups.
 - $permission : int = null
 - 
                    
The permission (DELETE, etc.) to remove. Defaults to all permissions.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —removeGuestPermission()
Removes a permission that guests currently have on this object.
    public
                    removeGuestPermission([int $permission = null ][, bool $update = true ]) : mixed
    
        Parameters
- $permission : int = null
 - 
                    
The permission (DELETE, etc.) to remove. Defaults to all permissions.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —removeUserPermission()
Removes a permission that a user currently has on this object.
    public
                    removeUserPermission([string $user = null ][, int $permission = null ][, bool $update = true ]) : mixed
    
        Parameters
- $user : string = null
 - 
                    
The user to remove the permission from. Defaults to all users.
 - $permission : int = null
 - 
                    
The permission (DELETE, etc.) to remove. Defaults to all permissions.
 - $update : bool = true
 - 
                    
Whether to automatically update the backend.
 
Return values
mixed —save()
Saves the current permission values from the cache to the IMAP folder.
    public
                    save() : mixed
    
    
    
        Return values
mixed —setCacheVersion()
Sets the revision number of the class.
    public
                    setCacheVersion(int $cacheVersion) : mixed
    
        Parameters
- $cacheVersion : int
 - 
                    
The revision number of the class.
 
Return values
mixed —setData()
Set permission details.
    public
                    setData(string $data) : mixed
    
        Parameters
- $data : string
 - 
                    
Permission details.
 
Return values
mixed —setName()
Set permission name
    public
                    setName(string $name) : mixed
    
        Parameters
- $name : string
 - 
                    
Permission name.
 
Return values
mixed —setPerm()
TODO
    public
                    setPerm(mixed $permId, mixed $permission[, mixed $update = true ]) : mixed
    
        Parameters
- $permId : mixed
 - $permission : mixed
 - $update : mixed = true
 
Return values
mixed —unsetPerm()
TODO
    public
                    unsetPerm(mixed $permId, mixed $permission[, mixed $update = true ]) : mixed
    
        Parameters
- $permId : mixed
 - $permission : mixed
 - $update : mixed = true
 
Return values
mixed —updatePermissions()
Updates the permissions based on data passed in the array.
    public
                    updatePermissions(array<string|int, mixed> $perms) : mixed
    
        Parameters
- $perms : array<string|int, mixed>
 - 
                    
An array containing the permissions which are to be updated.