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_Sqlng

Horde_Share_Base
Extended by Horde_Share_Sql
Extended by Horde_Share_Sqlng
Package: Share
Located at Horde/Share/Sqlng.php
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

Horde_Share_Base::__construct()

Overrides

Horde_Share_Sql::__construct()
public
# initShareObject( Horde_Share_Object $object )

Passes the available permissions to the share object.

Passes the available permissions to the share object.

Parameters

$object

Overrides

Horde_Share_Base::initShareObject()
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

Horde_Share_Exception

Overrides

Horde_Share_Sql::listShares()
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

Horde_Share_Exception

Overrides

Horde_Share_Sql::countShares()
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

Horde_Share_Exception

Overrides

Horde_Share_Sql::countOwners()
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

Horde_Share_Exception

Overrides

Horde_Share_Sql::listOwners()
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

$perm
bit mask.

Returns

array
The bit mask as an array.
Methods inherited from Horde_Share_Sql
getParent(), getShareCriteria(), getStorage(), getTable(), listAllShares(), listSystemShares(), removeShare(), setStorage(), setTable(), toDriverCharset()
Methods inherited from Horde_Share_Base
addCallback(), addShare(), exists(), expireListCache(), getApp(), getListCache(), getPermissions(), getPermsObject(), getShare(), getShareById(), getShares(), idExists(), newShare(), renameShare(), resetCache(), runCallback(), setListCache(), setLogger(), setShareCallback(), setShareClass()
Constants inherited from Horde_Share_Sql
SQL_FLAG_GROUPS, SQL_FLAG_USERS, VERSION
API documentation generated by ApiGen