PHP 클래스 Horde_Share_Sqlng, horde

상속: extends Horde_Share_Sql
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_availablePermissions This is necessary to unset certain permission when updating existing share objects.
$_shareObject string The Horde_Share_Object subclass to instantiate objects as

공개 메소드들

메소드 설명
__construct ( $app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups )
convertBitmaskToArray ( $perm ) : array Converts a bit mask number to a bit mask array.
countOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true ) : integer Count the number of users who have shares with the given permissions for the current user.
countShares ( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null, mixed $parent = null, boolean $allLevels = true ) : integer Returns the count of all shares that $userid has access to.
initShareObject ( Horde_Share_Object $object ) Passes the available permissions to the share object.
listOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true, integer $from, integer $count ) : array Return a list of users who have shares with the given permissions for the current user.
listShares ( string $userid, array $params = [] ) : array Returns an array of all shares that $userid has access to.
listSystemShares ( ) : array Returns an array of all system shares.

보호된 메소드들

메소드 설명
_buildPermsFromRow ( array $row ) : integer Builds a permission bit mask from all columns in a data row prefixed with "perm_".
_getPermsCriteria ( string $base, array $perms ) : string Builds an ANDed criteria snippet for a set or permissions.
_getShareCriteria ( string $userid, array $perms, array $attributes, array $shareids = null, $parent = null, $allLevels = true ) : string Returns a criteria statement for querying shares.
_getSharePerms ( array &$data ) Converts the permissions from the database table format into the Horde_Share format.
_getUserAndGroupShares ( string $userid, array $perms ) : array Returns the records and share IDs from the user and group tables that match the search criteria.

메소드 상세

__construct() 공개 메소드

또한 보기: Horde_Share_Base::__construct()
public __construct ( $app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups )
$perms Horde_Perms_Base
$groups Horde_Group_Base

_buildPermsFromRow() 보호된 메소드

Builds a permission bit mask from all columns in a data row prefixed with "perm_".
protected _buildPermsFromRow ( array $row ) : integer
$row array A data row including permission columns.
리턴 integer A permission mask.

_getPermsCriteria() 보호된 메소드

Builds an ANDed criteria snippet for a set or permissions.
protected _getPermsCriteria ( string $base, array $perms ) : string
$base string A column name prefix.
$perms array A list of permissions.
리턴 string The generated criteria string.

_getShareCriteria() 보호된 메소드

Returns a criteria statement for querying shares.
protected _getShareCriteria ( string $userid, array $perms, array $attributes, array $shareids = null, $parent = null, $allLevels = true ) : string
$userid string The userid of the user to check access for.
$perms array The level of permissions required.
$attributes array Restrict the shares returned to those who have these attribute values.
$shareids array Additional share IDs from user and group permissions.
리턴 string The criteria string for fetching this user's shares.

_getSharePerms() 보호된 메소드

Converts the permissions from the database table format into the Horde_Share format.
protected _getSharePerms ( array &$data )
$data array The share object data to convert.

_getUserAndGroupShares() 보호된 메소드

Returns the records and share IDs from the user and group tables that match the search criteria.
protected _getUserAndGroupShares ( string $userid, array $perms ) : array
$userid string The userid of the user to check access for.
$perms array The level of permissions required.
리턴 array A set of user, groups, and shareids.

convertBitmaskToArray() 공개 정적인 메소드

Converts a bit mask number to a bit mask array.
public static convertBitmaskToArray ( $perm ) : array
리턴 array The bit mask as an array.

countOwners() 공개 메소드

Count the number of users who have shares with the given permissions for the current user.
public countOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true ) : integer
$perm integer The level of permissions required.
$parent mixed The parent share to start looking in. (Horde_Share_Object, share_id, or null).
$allLevels boolean Return all levels, or just the direct children of $parent?
리턴 integer Number of users.

countShares() 공개 메소드

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

initShareObject() 공개 메소드

Passes the available permissions to the share object.
public initShareObject ( Horde_Share_Object $object )
$object Horde_Share_Object

listOwners() 공개 메소드

Return a list of users who have shares with the given permissions for the current user.
public listOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true, integer $from, integer $count ) : array
$perm integer The level of permissions required.
$parent mixed The parent share to start looking in. (Horde_Share_Object, share_id, or null)
$allLevels boolean Return all levels, or just the direct children of $parent? Defaults to all levels.
$from integer The user to start listing at.
$count integer The number of users to return.
리턴 array List of users.

listShares() 공개 메소드

Returns an array of all shares that $userid has access to.
public listShares ( string $userid, array $params = [] ) : array
$userid string The userid of the user to check access for.
$params array Additional parameters for the search.
 'perm'          Require this level of permissions. Horde_Perms constant.
 'attributes'    Restrict shares to these attributes. A hash or username.
 'from'          Offset. Start at this share
 'count'         Limit.  Only return this many.
 'sort_by'       Sort by attribute.
 'direction'     Sort by direction.
 'parent'        Start at this share in the hierarchy. Either share_id or
                 Horde_Share_Object
 'all_levels'    List all levels or just the direct children of parent?
리턴 array The shares the user has access to.

listSystemShares() 공개 메소드

Returns an array of all system shares.
public listSystemShares ( ) : array
리턴 array All system shares.

프로퍼티 상세

$_availablePermissions 보호되어 있는 프로퍼티

This is necessary to unset certain permission when updating existing share objects.
protected $_availablePermissions

$_shareObject 보호되어 있는 프로퍼티

The Horde_Share_Object subclass to instantiate objects as
protected string $_shareObject
리턴 string