PHP 클래스 Horde_Core_Imsp_Utils, horde

저자: Michael Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
createBook ( array $source, string $newName ) : mixed Utility function to help clients create new address books without having to create an imsp driver instance first.
getAllBooks ( array $serverInfo ) : array Utility function to retrieve the names of all the address books that the user has access to, along with the acl for those books. For information about the $serverInfo array see turba/config/sources.php as this is the cfgSources[] entry for the address books.
permsToACL ( integer $perms ) : string Translates Horde_Share permissions into IMSP acl.
setACL ( $params, string $book, string $name, string $acl ) : mixed Set's an address book's acl on the IMSP server.
synchShares ( Horde_Share $share_obj, array $serverInfo ) : mixed Synchronize Horde_Shares to existing IMSP address books.

보호된 메소드들

메소드 설명
_createShare ( $share_obj, array $params, array $shareparams ) : mixed Creates a Horde_Share for an *existing* IMSP address book.
_isOwner ( string $bookName, $username, $acl ) : boolean Determine if we are the owner of the address book.
_setPerms ( Horde_Share_Object &$share, string $acl ) Translates IMSP acl into share permissions and sets them in share.

메소드 상세

_createShare() 보호된 정적인 메소드

Needed for creating shares for address books created outside of Horde.
protected static _createShare ( $share_obj, array $params, array $shareparams ) : mixed
$params array
$shareparams array
리턴 mixed True | PEAR_Error

_isOwner() 보호된 정적인 메소드

Assumes ownership if username is beginning address book name or if user has admin rights ('a') in acl.
protected static _isOwner ( string $bookName, $username, $acl ) : boolean
$bookName string The address book name to check
리턴 boolean True if $user is owner, otherwise false.

_setPerms() 보호된 정적인 메소드

Translates IMSP acl into share permissions and sets them in share.
protected static _setPerms ( Horde_Share_Object &$share, string $acl )
$share Horde_Share_Object The share to assign perms to
$acl string The IMSP acl string.

createBook() 공개 정적인 메소드

Utility function to help clients create new address books without having to create an imsp driver instance first.
public static createBook ( array $source, string $newName ) : mixed
$source array Information about the user's default IMSP address book.
$newName string The name of the new address book.
리턴 mixed true on success or PEAR_Error on failure.

getAllBooks() 공개 정적인 메소드

Utility function to retrieve the names of all the address books that the user has access to, along with the acl for those books. For information about the $serverInfo array see turba/config/sources.php as this is the cfgSources[] entry for the address books.
public static getAllBooks ( array $serverInfo ) : array
$serverInfo array Information about the server and the current user.
리턴 array Information about all the address books or PEAR_Error.

permsToACL() 공개 정적인 메소드

Translates Horde_Share permissions into IMSP acl.
public static permsToACL ( integer $perms ) : string
$perms integer Horde_Perms style permission bitmask.
리턴 string An IMSP acl string

setACL() 공개 정적인 메소드

Set's an address book's acl on the IMSP server.
public static setACL ( $params, string $book, string $name, string $acl ) : mixed
$book string The address book name to set
$name string The user name to set for.
$acl string The acl string to set.
리턴 mixed True | Pear_Error

synchShares() 공개 메소드

Synchronize Horde_Shares to existing IMSP address books.
public synchShares ( Horde_Share $share_obj, array $serverInfo ) : mixed
$share_obj Horde_Share The Horde_Share object to use.
$serverInfo array Information about the IMSP server and the current user.
리턴 mixed Array describing any shares added or removed | PEAR_Error.