Count the number of users who have shares with the given permissions for the current user.
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?
Returns the count of all shares that $userid 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.
Returns a share's direct parent object.
Override the Horde_Share base class to avoid any confusion
void
getShare
( $name)
Redefinition of:
- Horde_Share::getShare()
- Returns a Horde_Share_Object object corresponding to the given share name, with the details retrieved appropriately.
Returns a Horde_Share_Object object corresponding to the given unique ID, with the details retrieved appropriately.
-
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.
Returns an array of Horde_Share_Object objects corresponding to the given set of unique IDs, with the details retrieved appropriately.
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.
Return a list of users who have shares with the given permissions for the current user.
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.
Returns an array of all shares that $userid has access to.
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.
Override new share creation so we can allow for shares with empty share_names.
void
&newShare
([ $name = ''])
Redefinition of:
- Horde_Share::newShare()
- Returns a new share object.
Removes a share from the shares system permanently. This will recursively delete all child shares as well.
Redefinition of:
- Horde_Share::removeShare()
- Removes a share from the shares system permanently.
Returns an array of criteria for querying shares.
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.
Returns an array of Horde_Share_Object_sql objects corresponding to the given set of unique IDs, with the details retrieved appropriately.
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.
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()