Class Horde_Share_sql_hierarchical

Description

Located in /Share/Share/sql_hierarchical.php (line 16)

Horde_Share
   |
   --Horde_Share_sql
      |
      --Horde_Share_sql_hierarchical
Variable Summary
 string $_shareObject
Method Summary
 integer countOwners ([integer $perm = PERMS_SHOW], [mixed $parent = null], [boolean $allLevels = true])
 integer countShares (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [mixed $parent = null], [boolean $allLevels = true])
 void getShare ( $name)
 array &getShares (array $cids)
 array listOwners ([integer $perm = PERMS_SHOW], [mixed $parent = null], [boolean $allLevels = true], [integer $from = 0], [integer $count = 0])
 mixed &listShares (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [integer $from = 0], [integer $count = 0], [string $sort_by = null], [integer $direction = 0], [mixed $parent = null], [ $allLevels = true], [ $ignorePerms = false], boolean $alllevels)
 void &newShare ([ $name = ''])
 void removeShare ( &$share, Horde_Share_Object $share)
 string _getShareCriteria (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [mixed $parent = null], [boolean $allLevels = true], [ $ignorePerms = false])
 array &_getShares ( $ids, array $cids)
Variables
string $_shareObject = 'Horde_Share_Object_sql_hierarchical' (line 23)

The Horde_Share_Object subclass to instantiate objects as


Redefinition of:
Horde_Share_sql::$_shareObject
The Horde_Share_Object subclass to instantiate objects as

Inherited Variables

Inherited from Horde_Share_sql

Horde_Share_sql::$_db
Horde_Share_sql::$_params
Horde_Share_sql::$_table
Horde_Share_sql::$_write_db

Inherited from Horde_Share

Horde_Share::$_app
Horde_Share::$_cache
Horde_Share::$_listcache
Horde_Share::$_root
Horde_Share::$_shareMap
Horde_Share::$_sortList
Methods
countOwners (line 362)

Count the number of users who have shares with the given permissions for the current user.

  • return: Number of users.
integer countOwners ([integer $perm = PERMS_SHOW], [mixed $parent = null], [boolean $allLevels = true])
  • integer $perm: The level of permissions required.
  • mixed $parent: The parent share to start looking in. (Horde_Share_Object, share_id, or null).
  • boolean $allLevels: Return all levels, or just the direct children of $parent?
countShares (line 584)

Returns the count of all shares that $userid has access to.

  • return: Number of shares the user has access to.
integer countShares (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [mixed $parent = null], [boolean $allLevels = true])
  • string $userid: The userid of the user to check access for.
  • integer $perm: The level of permissions required.
  • mixed $attributes: Restrict the shares counted to those matching $attributes. An array of attribute/values pairs or a share owner username.
  • mixed $parent: The share to start searching from (Horde_Share_Object, share_id, or null)
  • boolean $allLevels: Return all levels, or just the direct children of $parent?

Redefinition of:
Horde_Share::countShares()
Returns the number of shares that $userid has access to.
getParent (line 378)

Returns a share's direct parent object.

  • return: The parent share, if it exists.
Horde_Share_Object getParent ( $child, Horde_Share_Object $share)
getShare (line 563)

Override the Horde_Share base class to avoid any confusion

void getShare ( $name)
  • $name

Redefinition of:
Horde_Share::getShare()
Returns a Horde_Share_Object object corresponding to the given share name, with the details retrieved appropriately.
getShareById (line 398)

Returns a Horde_Share_Object object corresponding to the given unique ID, with the details retrieved appropriately.

  • return: The requested share.
Horde_Share_Object &getShareById (string $cid)
  • string $cid: The id of the share to retrieve.

Redefinition of:
Horde_Share::getShareById()
Returns a Horde_Share_Object object corresponding to the given unique ID, with the details retrieved appropriately.
getShares (line 420)

Returns an array of Horde_Share_Object objects corresponding to the given set of unique IDs, with the details retrieved appropriately.

  • return: The requested shares keyed by share_id.
array &getShares (array $cids)
  • array $cids: The array of ids to retrieve.

Redefinition of:
Horde_Share::getShares()
Returns an array of Horde_Share_Object objects corresponding to the given set of unique IDs, with the details retrieved appropriately.
listOwners (line 321)

Return a list of users who have shares with the given permissions for the current user.

  • return: List of users.
array listOwners ([integer $perm = PERMS_SHOW], [mixed $parent = null], [boolean $allLevels = true], [integer $from = 0], [integer $count = 0])
  • integer $perm: The level of permissions required.
  • mixed $parent: The parent share to start looking in. (Horde_Share_Object, share_id, or null)
  • boolean $allLevels: Return all levels, or just the direct children of $parent? Defaults to all levels.
  • integer $from: The user to start listing at.
  • integer $count: The number of users to return.
listShares (line 70)

Returns an array of all shares that $userid has access to.

  • return: The shares the user has access to || PEAR_Error
mixed &listShares (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [integer $from = 0], [integer $count = 0], [string $sort_by = null], [integer $direction = 0], [mixed $parent = null], [ $allLevels = true], [ $ignorePerms = false], boolean $alllevels)
  • string $userid: The userid of the user to check access for.
  • integer $perm: The level of permissions required.
  • mixed $attributes: Restrict the shares counted to those matching $attributes. An array of attribute/values pairs or a share owner username.
  • integer $from: The share to start listing from.
  • integer $count: The number of shares to return.
  • string $sort_by: The field to sort by
  • integer $direction: The sort direction
  • mixed $parent: Either a share_id, Horde_Share_Object or null.
  • boolean $alllevels: List all levels or just the direct children of $parent?
  • $allLevels
  • $ignorePerms

Redefinition of:
Horde_Share_sql::listShares()
Returns an array of all shares that $userid has access to.
newShare (line 30)

Override new share creation so we can allow for shares with empty share_names.

void &newShare ([ $name = ''])
  • $name

Redefinition of:
Horde_Share::newShare()
Returns a new share object.
removeShare (line 454)

Removes a share from the shares system permanently. This will recursively delete all child shares as well.

void removeShare ( &$share, Horde_Share_Object $share)

Redefinition of:
Horde_Share::removeShare()
Removes a share from the shares system permanently.
_getShareCriteria (line 190)

Returns an array of criteria for querying shares.

  • return: The criteria string for fetching this user's shares.
  • access: protected
string _getShareCriteria (string $userid, [integer $perm = PERMS_SHOW], [mixed $attributes = null], [mixed $parent = null], [boolean $allLevels = true], [ $ignorePerms = false])
  • string $userid: The userid of the user to check access for.
  • integer $perm: The level of permissions required.
  • mixed $attributes: Restrict the shares returned to those who have these attribute values.
  • mixed $parent: The share to start searching in. (A Horde_Share_Object, share_id or null)
  • boolean $allLevels: Return all levels, or just the direct children of $parent? Defaults to all levels.
  • $ignorePerms

Redefinition of:
Horde_Share_sql::_getShareCriteria()
Returns an array of criteria for querying shares.
_getShares (line 494)

Returns an array of Horde_Share_Object_sql objects corresponding to the given set of unique IDs, with the details retrieved appropriately.

  • return: The requested shares keyed by share_id.
array &_getShares ( $ids, array $cids)
  • array $cids: The array of ids to retrieve.
  • $ids

Redefinition of:
Horde_Share_sql::_getShares()
Returns an array of Horde_Share_Object_sql objects corresponding to the given set of unique IDs, with the details retrieved appropriately.
_newShare (line 45)

Returns a new share object.

  • return: A new share object.
Horde_Share_Object_sql &_newShare (string $name)
  • string $name: The share's name.

Redefinition of:
Horde_Share_sql::_newShare()
Returns a new share object.

Inherited Methods

Inherited From Horde_Share_sql

 Horde_Share_sql::getTable()
 Horde_Share_sql::getWriteDb()
 Horde_Share_sql::listAllShares()
 Horde_Share_sql::listShares()
 Horde_Share_sql::_addShare()
 Horde_Share_sql::_buildPermsFromRow()
 Horde_Share_sql::_connect()
 Horde_Share_sql::_countShares()
 Horde_Share_sql::_exists()
 Horde_Share_sql::_fromDriverCharset()
 Horde_Share_sql::_getShare()
 Horde_Share_sql::_getShareById()
 Horde_Share_sql::_getShareCriteria()
 Horde_Share_sql::_getShareGroups()
 Horde_Share_sql::_getSharePerms()
 Horde_Share_sql::_getShares()
 Horde_Share_sql::_getShareUsers()
 Horde_Share_sql::_hasGroups()
 Horde_Share_sql::_hasUsers()
 Horde_Share_sql::_listAllShares()
 Horde_Share_sql::_loadPermissions()
 Horde_Share_sql::_newShare()
 Horde_Share_sql::_removeShare()
 Horde_Share_sql::_selectDB()
 Horde_Share_sql::_toDriverCharset()
 Horde_Share_sql::_toDriverKeys()
 Horde_Share_sql::__sleep()
 Horde_Share_sql::__wakeup()

Inherited From Horde_Share

 Horde_Share::Horde_Share()
 Horde_Share::addShare()
 Horde_Share::countShares()
 Horde_Share::exists()
 Horde_Share::getIdentityByShare()
 Horde_Share::getPermissions()
 Horde_Share::getShare()
 Horde_Share::getShareById()
 Horde_Share::getShares()
 Horde_Share::listAllShares()
 Horde_Share::listShares()
 Horde_Share::newShare()
 Horde_Share::removeShare()
 Horde_Share::shutdown()
 Horde_Share::singleton()
 Horde_Share::_sortShares()
 Horde_Share::__sleep()
 Horde_Share::__wakeup()

Documentation generated on Sun, 30 Jan 2011 05:22:14 +0000 by phpDocumentor 1.4.3