Methods summary
public
|
#
__construct( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups )
Parameters
- $app
- <p>The application that the shares belong
to.</p>
- $user
- The current user.
- $perms
- The permissions object.
- $groups
- The Horde_Group driver.
See
Overrides
|
public
|
#
initShareObject( Horde_Share_Object $object )
Passes the available permissions to the share object.
Passes the available permissions to the share object.
Parameters
Overrides
|
public
array
|
#
listShares( string $userid, array $params = array() )
Returns an array of all shares that $userid has access to.
Returns an array of all shares that $userid has access to.
Parameters
- $userid
- The userid of the user to check access for.
- $params
- Additional parameters for the search.
<pre><span class="php-quote">'perm'</span> <span class="php-keyword1">Require</span> this level of permissions. Horde_Perms <span class="php-keyword2">constant</span>.
<span class="php-quote">'attributes'</span> Restrict shares to these attributes. A <span class="php-keyword2">hash</span> <span class="php-keyword1">or</span> username.
<span class="php-quote">'from'</span> Offset. Start at this share
<span class="php-quote">'count'</span> Limit. Only <span class="php-keyword1">return</span> this many.
<span class="php-quote">'sort_by'</span> <span class="php-keyword2">Sort</span> by attribute.
<span class="php-quote">'direction'</span> <span class="php-keyword2">Sort</span> by direction.
<span class="php-quote">'parent'</span> Start at this share in the hierarchy. Either share_id <span class="php-keyword1">or</span>
Horde_Share_Object
<span class="php-quote">'all_levels'</span> <span class="php-keyword1">List</span> all levels <span class="php-keyword1">or</span> just the direct children of parent?</pre>
Returns
array The shares the user has access to.
Throws
Overrides
|
public
integer
|
#
countShares( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null, mixed $parent = null, boolean $allLevels = true )
Returns the count of all shares that $userid has access to.
Returns the count of all shares that $userid has access to.
Parameters
- $userid
- The userid of the user to check access for.
- $perm
- The level of permissions required.
- $attributes
- <p>Restrict the shares counted to those
matching $attributes. An array of
attribute/values pairs or a share owner
username.</p>
- $parent
- <p>The share to start searching from
(Horde_Share_Object, share_id, or null)</p>
- $allLevels
- <p>Return all levels, or just the direct
children of $parent?</p>
Returns
integer Number of shares the user has access to.
Throws
Overrides
|
public
integer
|
#
countOwners( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true )
Count the number of users who have shares with the given permissions
for the current user.
Count the number of users who have shares with the given permissions
for the current user.
Parameters
- $perm
- The level of permissions required.
- $parent
- <p>The parent share to start looking in.
(Horde_Share_Object, share_id, or null).</p>
- $allLevels
- <p>Return all levels, or just the direct
children of $parent?</p>
Returns
integer Number of users.
Throws
Overrides
|
public
array
|
#
listOwners( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true, integer $from = 0, integer $count = 0 )
Return a list of users who have shares with the given permissions
for the current user.
Return a list of users who have shares with the given permissions
for the current user.
Parameters
- $perm
- The level of permissions required.
- $parent
- <p>The parent share to start looking in.
(Horde_Share_Object, share_id, or null)</p>
- $allLevels
- <p>Return all levels, or just the direct
children of $parent? Defaults to all levels.</p>
- $from
- The user to start listing at.
- $count
- The number of users to return.
Returns
array List of users.
Throws
Overrides
|
public static
array
|
#
convertBitmaskToArray( integer $perm )
Converts a bit mask number to a bit mask array.
Converts a bit mask number to a bit mask array.
Parameters
Returns
array The bit mask as an array.
|