Extension of the Horde_Share_Object class for handling Kolab share
information.
Copyright 2004-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.
Methods summary
public
|
#
__construct( string $id, Horde_Group_Base $groups, array $data = array() )
Constructor.
Parameters
- $id
- The share id.
- $groups
- The Horde_Group driver
- $data
- The share data.
|
public
string
|
#
serialize( )
Serialize this object.
Returns
string The serialized data.
Implementation of
Serializable::serialize()
|
public
|
#
unserialize( <type> $data )
Unserialize object.
Parameters
Implementation of
Serializable::unserialize()
|
public
string
|
#
getId( )
Returns the ID of this share.
Returns the ID of this share.
Returns
string The share's ID.
|
public
string
|
#
getPermissionId( )
Returns the permission ID of this share.
Returns the permission ID of this share.
Returns
string The share's permission ID.
|
public
string
|
#
getName( )
Returns the name of this share.
Returns the name of this share.
Returns
string The share's name.
|
public
string
|
#
getOwner( )
Returns the owner of this share.
Returns the owner of this share.
Returns
string The share's owner.
|
public
mixed
|
#
get( string $attribute )
Returns an attribute value from this object.
Returns an attribute value from this object.
Parameters
- $attribute
- The attribute to return.
Returns
mixed The value for $attribute.
|
public
null
|
#
set( string $attribute, mixed $value, boolean $update = false )
Sets an attribute value in this object.
Sets an attribute value in this object.
Parameters
- $attribute
- The attribute to set.
- $value
- The value for $attribute.
- $update
- Update <em>only</em> this change immediately.
Returns
null
|
public
integer
|
#
countChildren( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true )
Return a count of the number of children this share has
Return a count of the number of children this share has
Parameters
- $user
- The user to use for checking perms
- $perm
- A Horde_Perms::* constant
- $allLevels
- Count grandchildren or just children
Returns
integer The number of child shares
|
public
array
|
#
getChildren( string $user, integer $perm = Horde_Perms::SHOW, boolean $allLevels = true )
Get all children of this share.
Get all children of this share.
Parameters
- $user
- The user to use for checking perms
- $perm
- <p>Horde_Perms::* constant. If NULL will return
all shares regardless of permissions.</p>
- $allLevels
- Return all levels.
Returns
array An array of Horde_Share_Object objects
|
public
Horde_Share_Object |null
|
#
getParent( )
Returns a child's direct parent.
Returns a child's direct parent.
Returns
Horde_Share_Object |null
The direct parent Horde_Share_Object or
NULL in case the share has no parent.
|
public
array()
|
#
getParents( )
Get all of this share's parents.
Get all of this share's parents.
Returns
array() An array of Horde_Share_Objects
|
public
null
|
#
setParent( mixed $parent )
Set the parent object for this share.
Set the parent object for this share.
Parameters
- $parent
- A Horde_Share object or share id for the parent.
Returns
null
|
public
boolean
|
#
hasPermission( string $userid, integer $permission, string $creator = null )
Checks to see if a user has a given permission.
Checks to see if a user has a given permission.
Parameters
- $userid
- The userid of the user.
- $permission
- A Horde_Perms::* constant to test for.
- $creator
- The creator of the shared object.
Returns
boolean Whether or not $userid has $permission.
|
public
Horde_Perms_Permission_Kolab
|
#
getPermission( )
Returns the permissions from this storage object.
Returns the permissions from this storage object.
Returns
Horde_Perms_Permission_Kolab The permissions on the share.
|
public
null
|
#
setPermission( Horde_Perms_Permission_Kolab $perms, boolean $update = true )
Sets the permissions on the share.
Sets the permissions on the share.
Parameters
- $perms
- <p>Permission object to folder on the
object.</p>
- $update
- Save the updated information?
Returns
null
|
public
An
|
#
getAcl( )
Retrieve the Kolab specific access rights for this share.
Retrieve the Kolab specific access rights for this share.
Returns
An array of rights.
|
public
null
|
#
setAcl( string $user, string $acl )
Set the Kolab specific access rights for this share.
Set the Kolab specific access rights for this share.
Parameters
- $user
- The user to set the ACL for.
- $acl
- The ACL.
Returns
null
|
public
null
|
#
deleteAcl( string $user )
Delete Kolab specific access rights for this share.
Delete Kolab specific access rights for this share.
Parameters
- $user
- The user to delete the ACL for.
Returns
null
|