PHP Class Horde_Share_Object_Kolab, horde

Copyright 2004-2016 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.
Inheritance: extends Horde_Share_Object, implements Serializable, implements Horde_Perms_Permission_Kolab_Storage
Exibir arquivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_data array The share attributes.

Public Methods

Method Description
__construct ( string $id, Horde_Group_Base $groups, array $data = [] ) Constructor.
countChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : integer Return a count of the number of children this share has
deleteAcl ( string $user ) : null Delete Kolab specific access rights for this share.
get ( string $attribute ) : mixed Returns an attribute value from this object.
getAcl ( ) : An Retrieve the Kolab specific access rights for this share.
getChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : array Get all children of this share.
getId ( ) : string Returns the ID of this share.
getName ( ) : string Returns the name of this share.
getOwner ( ) : string Returns the owner of this share.
getParent ( ) : Horde_Share_Object | null Returns a child's direct parent.
getParents ( ) : array() Get all of this share's parents.
getPermission ( ) : Horde_Perms_Permission_Kolab Returns the permissions from this storage object.
getPermissionId ( ) : string Returns the permission ID of this share.
hasPermission ( string $userid, integer $permission, string $creator = null ) : boolean Checks to see if a user has a given permission.
serialize ( ) : string Serialize this object.
set ( string $attribute, mixed $value, boolean $update = false ) : null Sets an attribute value in this object.
setAcl ( string $user, string $acl ) : null Set the Kolab specific access rights for this share.
setParent ( mixed $parent ) : null Set the parent object for this share.
setPermission ( Horde_Perms_Permission_Kolab $perms, boolean $update = true ) : null Sets the permissions on the share.
unserialize ( $data ) Unserialize object.

Protected Methods

Method Description
_save ( ) Saves the current attribute values.

Method Details

__construct() public method

Constructor.
public __construct ( string $id, Horde_Group_Base $groups, array $data = [] )
$id string The share id.
$groups Horde_Group_Base The Horde_Group driver
$data array The share data.

_save() protected method

Saves the current attribute values.
protected _save ( )

countChildren() public method

Return a count of the number of children this share has
public countChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : integer
$user string The user to use for checking perms
$perm integer A Horde_Perms::* constant
$allLevels boolean Count grandchildren or just children
return integer The number of child shares

deleteAcl() public method

Delete Kolab specific access rights for this share.
public deleteAcl ( string $user ) : null
$user string The user to delete the ACL for.
return null

get() public method

Returns an attribute value from this object.
public get ( string $attribute ) : mixed
$attribute string The attribute to return.
return mixed The value for $attribute.

getAcl() public method

Retrieve the Kolab specific access rights for this share.
public getAcl ( ) : An
return An array of rights.

getChildren() public method

Get all children of this share.
public getChildren ( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true ) : array
$user string The user to use for checking perms
$perm integer Horde_Perms::* constant. If NULL will return all shares regardless of permissions.
$allLevels boolean Return all levels.
return array An array of Horde_Share_Object objects

getId() public method

Returns the ID of this share.
public getId ( ) : string
return string The share's ID.

getName() public method

Returns the name of this share.
public getName ( ) : string
return string The share's name.

getOwner() public method

Returns the owner of this share.
public getOwner ( ) : string
return string The share's owner.

getParent() public method

Returns a child's direct parent.
public getParent ( ) : Horde_Share_Object | null
return Horde_Share_Object | null The direct parent Horde_Share_Object or NULL in case the share has no parent.

getParents() public method

Get all of this share's parents.
public getParents ( ) : array()
return array()

getPermission() public method

Returns the permissions from this storage object.
public getPermission ( ) : Horde_Perms_Permission_Kolab
return Horde_Perms_Permission_Kolab The permissions on the share.

getPermissionId() public method

Returns the permission ID of this share.
public getPermissionId ( ) : string
return string The share's permission ID.

hasPermission() public method

Checks to see if a user has a given permission.
public hasPermission ( string $userid, integer $permission, string $creator = null ) : boolean
$userid string The userid of the user.
$permission integer A Horde_Perms::* constant to test for.
$creator string The creator of the shared object.
return boolean Whether or not $userid has $permission.

serialize() public method

Serialize this object.
public serialize ( ) : string
return string The serialized data.

set() public method

Sets an attribute value in this object.
public set ( string $attribute, mixed $value, boolean $update = false ) : null
$attribute string The attribute to set.
$value mixed The value for $attribute.
$update boolean Update *only* this change immediately.
return null

setAcl() public method

Set the Kolab specific access rights for this share.
public setAcl ( string $user, string $acl ) : null
$user string The user to set the ACL for.
$acl string The ACL.
return null

setParent() public method

Set the parent object for this share.
public setParent ( mixed $parent ) : null
$parent mixed A Horde_Share object or share id for the parent.
return null

setPermission() public method

Sets the permissions on the share.
public setPermission ( Horde_Perms_Permission_Kolab $perms, boolean $update = true ) : null
$perms Horde_Perms_Permission_Kolab Permission object to folder on the object.
$update boolean Save the updated information?
return null

unserialize() public method

Unserialize object.
public unserialize ( $data )
$data

Property Details

$_data protected_oe property

The share attributes.
protected array $_data
return array