Overview

Packages

  • None
  • Share

Classes

  • Horde_Share_Base
  • Horde_Share_Datatree
  • Horde_Share_Kolab
  • Horde_Share_Object
  • Horde_Share_Object_Datatree
  • Horde_Share_Object_DataTree_Share
  • Horde_Share_Object_Kolab
  • Horde_Share_Object_Sql
  • Horde_Share_Object_Sqlng
  • Horde_Share_Sql
  • Horde_Share_Sqlng
  • Horde_Share_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Share_Object_Sql

Extension of the Horde_Share_Object class for storing share information in the sql driver.

Horde_Share_Object implements Serializable
Extended by Horde_Share_Object_Sql implements Serializable

Direct known subclasses

Horde_Share_Object_Sqlng
Package: Share
Author: Duck duck@obala.net
Author: Michael J. Rubinsky mrubinsk@horde.org
Located at Horde/Share/Object/Sql.php
Methods summary
public
# __construct( array $data )

Constructor.

Constructor.

Parameters

$data
Share data array.
public string
# serialize( )

Serialize this object.

Serialize this object.

Returns

string
The serialized data.

Implementation of

Serializable::serialize()
public
# unserialize( string $data )

Reconstruct the object from serialized data.

Reconstruct the object from serialized data.

Parameters

$data
The serialized data.

Implementation of

Serializable::unserialize()
public boolean
# 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 immeditely.

Returns

boolean
public mixed
# get( string $attribute )

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

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

Parameters

$attribute
The attribute to retrieve.

Returns

mixed
The value of the attribute, or an empty string.
public string
# getId( )

Returns the ID of this share.

Returns the ID of this share.

Returns

string
The share's ID.
public string
# getName( )

Returns the name of this share.

Returns the name of this share.

Returns

string
The share's name.
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
# getParent( )

Returns a child's direct parent

Returns a child's direct parent

Returns

Horde_Share_Object
The direct parent Horde_Share_Object
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 boolean
# 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

boolean
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 event.

Returns

boolean
Whether or not $userid has $permission.
public
# setPermission( Horde_Perms_Permission $perm, boolean $update = true )

Sets the permission of this share.

Sets the permission of this share.

Parameters

$perm
Permission object.
$update
<p>Should the share be saved after this operation?</p>
public Horde_Perms_Permission
# getPermission( )

Returns the permission of this share.

Returns the permission of this share.

Returns

Horde_Perms_Permission

Permission object that represents the permissions on this share.

Methods inherited from Horde_Share_Object
addCreatorPermission(), addDefaultPermission(), addGroupPermission(), addGuestPermission(), addUserPermission(), getShareOb(), listGroups(), listUsers(), removeCreatorPermission(), removeDefaultPermission(), removeGroup(), removeGroupPermission(), removeGuestPermission(), removeUser(), removeUserPermission(), save(), setShareOb()
Constants summary
integer VERSION

Serializable version.

Serializable version.

# 2
Properties summary
public array $data

The actual storage object that holds the data.

The actual storage object that holds the data.

Todo:

Check visibility - should be protected/private
# array()
API documentation generated by ApiGen