PHP 클래스 Horde_Share_Kolab, horde

Copyright 2004-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
저자: Stuart Binge ([email protected])
저자: Gunnar Wrobel ([email protected])
상속: extends Horde_Share_Base
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups ) Constructor.
constructFolderName ( string $owner, string $subpath, string $prefix = null ) : string Construct the Kolab storage folder name based on the share name and owner attributes.
constructId ( string $owner, string $name, string $prefix = null ) : string Construct the ID from the owner name and the folder subpath.
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.
deleteAcl ( string $id, string $user ) : null Delete Kolab specific access rights for a share.
getAcl ( string $id ) : An Retrieve the Kolab specific access rights for a share.
getFolderNameElements ( string $folder ) : array Retrieve namespace information for a folder name.
getList ( ) : Horde_Kolab_Storage_List Return the Kolab storage folder list handler.
getStorage ( ) : Horde_Kolab_Storage Return the Kolab storage backend associated with this driver.
getType ( ) : string Return the type of folder this share driver will access in the Kolab storage backend (depends on the application calling the share driver).
listSystemShares ( ) : array Returns an array of all system shares.
save ( string $id, string $old_id, array $data ) : null Save share data to the storage backend.
setAcl ( string $id, string $user, string $acl ) : null Set the Kolab specific access rights for a share.
setStorage ( Horde_Kolab_Storage $storage ) : null Set the Kolab storage backend.

보호된 메소드들

메소드 설명
_addShare ( Horde_Share_Object $share ) Adds a share to the shares system.
_exists ( string $share ) : boolean Checks if a share exists in the system.
_getShare ( string $name ) : Horde_Share_Object Returns a Horde_Share_Object_Kolab object corresponding to the given share name, with the details retrieved appropriately.
_getShareById ( integer $id ) : Horde_Share_Object_sql Returns a Horde_Share_Object_sql object corresponding to the given unique ID, with the details retrieved appropriately.
_getShares ( array $ids ) : array Returns an array of Horde_Share_Object_kolab objects corresponding to the requested folders.
_idExists ( integer $id ) : boolean Check that a share id exists in the system.
_listAllShares ( ) : array Lists *all* shares for the current app/share, regardless of permissions.
_listShares ( string $userid, array $params = [] ) : array Returns an array of all shares that $userid has access to.
_newShare ( string $name ) : Horde_Share_Object_kolab Returns a new share object.
_removeShare ( Horde_Share_Object $share ) Removes a share from the shares system permanently.
_renameShare ( Horde_Share_Object $share, string $name ) Renames a share in the shares system.

비공개 메소드들

메소드 설명
_createObject ( string $id, array $data = [] ) : Horde_Share_Object Returns a Horde_Share_Object_Kolab object corresponding to the given share name, with the details retrieved appropriately.
_idDecode ( string $id ) : string Decode a share ID.
_idDeconstruct ( string $id ) : array Deconstruct the ID elements from the ID string
_idEncode ( string $id ) : string Encode a share ID.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups )
$app string The application that the shares belong to
$user string The current user
$perms Horde_Perms_Base The permissions object
$groups Horde_Group_Base The Horde_Group driver.

_addShare() 보호된 메소드

The share must first be created with Horde_Share::newShare(), and have any initial details added to it, before this function is called.
protected _addShare ( Horde_Share_Object $share )
$share Horde_Share_Object The new share object.

_exists() 보호된 메소드

Checks if a share exists in the system.
protected _exists ( string $share ) : boolean
$share string The share to check.
리턴 boolean True if the share exists.

_getShare() 보호된 메소드

Returns a Horde_Share_Object_Kolab object corresponding to the given share name, with the details retrieved appropriately.
protected _getShare ( string $name ) : Horde_Share_Object
$name string The name of the share to retrieve.
리턴 Horde_Share_Object The requested share.

_getShareById() 보호된 메소드

Returns a Horde_Share_Object_sql object corresponding to the given unique ID, with the details retrieved appropriately.
protected _getShareById ( integer $id ) : Horde_Share_Object_sql
$id integer The id of the share to retrieve.
리턴 Horde_Share_Object_sql The requested share.

_getShares() 보호된 메소드

Returns an array of Horde_Share_Object_kolab objects corresponding to the requested folders.
protected _getShares ( array $ids ) : array
$ids array The ids of the shares to fetch.
리턴 array An array of Horde_Share_Object_kolab objects.

_idExists() 보호된 메소드

Check that a share id exists in the system.
protected _idExists ( integer $id ) : boolean
$id integer The share id
리턴 boolean True if the share exists.

_listAllShares() 보호된 메소드

For the Kolab backend this cannot work in the same way as for the SQL based backend. Permissions are always handled by the backend automatically (IMAP ACLs) and cannot be disabled. listAllShares() is apparently used during command line scipts where it represents administrator access. This is possible on Kolab by using the "manager" user. In that case a standard listShares() authenticated as "manager" should be sufficient.
protected _listAllShares ( ) : array
리턴 array All shares for the current app/share.

_listShares() 보호된 메소드

Returns an array of all shares that $userid has access to.
protected _listShares ( string $userid, array $params = [] ) : array
$userid string The userid of the user to check access for.
$params array See listShares().
리턴 array The shares the user has access to.

_newShare() 보호된 메소드

Returns a new share object.
protected _newShare ( string $name ) : Horde_Share_Object_kolab
$name string The share's name.
리턴 Horde_Share_Object_kolab A new share object.

_removeShare() 보호된 메소드

Removes a share from the shares system permanently.
protected _removeShare ( Horde_Share_Object $share )
$share Horde_Share_Object The share to remove.

_renameShare() 보호된 메소드

Renames a share in the shares system.
protected _renameShare ( Horde_Share_Object $share, string $name )
$share Horde_Share_Object The share to rename.
$name string The share's new name.

constructFolderName() 공개 메소드

Construct the Kolab storage folder name based on the share name and owner attributes.
public constructFolderName ( string $owner, string $subpath, string $prefix = null ) : string
$owner string The owner of the share.
$subpath string The folder subpath.
$prefix string The namespace prefix.
리턴 string The folder name for the Kolab backend.

constructId() 공개 메소드

Construct the ID from the owner name and the folder subpath.
public constructId ( string $owner, string $name, string $prefix = null ) : string
$owner string The share owner.
$name string The name of the folder without the namespace prefix.
$prefix string The namespace prefix.
리턴 string The encoded ID.

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.

deleteAcl() 공개 메소드

Delete Kolab specific access rights for a share.
public deleteAcl ( string $id, string $user ) : null
$id string The share ID.
$user string The user to delete the ACL for
리턴 null

getAcl() 공개 메소드

Retrieve the Kolab specific access rights for a share.
public getAcl ( string $id ) : An
$id string The share ID.
리턴 An array of rights.

getFolderNameElements() 공개 메소드

Retrieve namespace information for a folder name.
public getFolderNameElements ( string $folder ) : array
$folder string The folder name.
리턴 array A list of namespace prefix, the delimiter and the folder subpath.

getList() 공개 메소드

Return the Kolab storage folder list handler.
public getList ( ) : Horde_Kolab_Storage_List
리턴 Horde_Kolab_Storage_List The folder list handler.

getStorage() 공개 메소드

Return the Kolab storage backend associated with this driver.
public getStorage ( ) : Horde_Kolab_Storage
리턴 Horde_Kolab_Storage The Kolab storage driver.

getType() 공개 메소드

Return the type of folder this share driver will access in the Kolab storage backend (depends on the application calling the share driver).
public getType ( ) : string
리턴 string

listSystemShares() 공개 메소드

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

save() 공개 메소드

Save share data to the storage backend.
public save ( string $id, string $old_id, array $data ) : null
$id string The share id.
$old_id string The old share id.
$data array The share data.
리턴 null

setAcl() 공개 메소드

Set the Kolab specific access rights for a share.
public setAcl ( string $id, string $user, string $acl ) : null
$id string The share ID.
$user string The user to set the ACL for.
$acl string The ACL.
리턴 null

setStorage() 공개 메소드

Set the Kolab storage backend.
public setStorage ( Horde_Kolab_Storage $storage ) : null
$storage Horde_Kolab_Storage The Kolab storage handler.
리턴 null