PHP 클래스 Turba_Driver_Imsp, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (ASL). If you did did not receive this file, see http://www.horde.org/licenses/apache.
저자: Michael Rubinsky ([email protected])
상속: extends Turba_Driver
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_authenticated boolean Holds if we are authenticated.
$_bookName string The name of the addressbook.
$_capabilities array Driver capabilities.
$_groupField string Holds name of the field indicating an IMSP group.
$_groupValue string Holds value that $_groupField will have if entry is an IMSP group.
$_imsp Horde_Imsp Horde_Imsp object
$_noGroups boolean Used to set if the current search is for contacts only.

공개 메소드들

메소드 설명
__construct ( string $name = '', array $params = [] ) Constructs a new Turba imsp driver object.
_sendSearch ( array $criteria ) : array Sends a search request to the server.
checkDefaultShare ( $share, $srcConfig ) : TODO Check if the passed in share is the default share for this source.
createShare ( $share_id, $params ) : Horde_Share Creates a new Horde_Share and creates the address book on the IMSP server.
hasPermission ( integer $perm ) : boolean Checks if the current user has the requested permission on this source.

보호된 메소드들

메소드 설명
_aclToHordePerms ( string $acl ) : integer Converts an acl string to a Horde Permissions bitmask.
_add ( array $attributes, array $blob_fields = [], array $date_fields = [] ) Adds the specified contact to the addressbook.
_canAdd ( ) TODO
_countDelimiters ( string $in ) : integer Helper function to count the occurances of the ':' * delimiter in group member entries.
_delete ( $object_key, $object_id ) Deletes the specified object from the IMSP server.
_deleteAll ( ) Deletes the address book represented by this driver from the IMSP server.
_doSearch ( array $criteria, string $glue ) : array Parses the search criteria, requests the individual searches from the server and performs any necessary ANDs / ORs on the results.
_getContactOwner ( ) : string Returns the owner for this contact. For an IMSP source, this should be the name of the address book.
_getDuplicated ( array $names ) : array Returns only those names that are duplicated in $names
_getGroupEmails ( string $emailText ) : array Parses out $emailText into an array of pure email addresses suitable for searching the IMSP datastore with.
_makeKey ( array $attributes ) : string Create an object key for a new object.
_read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [] ) : array Reads the given data from the address book and returns the results.
_removeDuplicated ( array $names ) : array Returns an array with all duplicate names removed.
_save ( Turba_Object $object ) : string Saves the specified object to the IMSP server.
_search ( array $criteria, array $fields, array $blobFields = [], $count_only = false ) : array Returns all entries matching $critera.

메소드 상세

__construct() 공개 메소드

Constructs a new Turba imsp driver object.
public __construct ( string $name = '', array $params = [] )
$name string Source name
$params array Hash containing additional configuration parameters.

_aclToHordePerms() 보호된 메소드

Converts an acl string to a Horde Permissions bitmask.
protected _aclToHordePerms ( string $acl ) : integer
$acl string A standard, IMAP style acl string.
리턴 integer Horde Permissions bitmask.

_add() 보호된 메소드

Adds the specified contact to the addressbook.
protected _add ( array $attributes, array $blob_fields = [], array $date_fields = [] )
$attributes array The attribute values of the contact.
$blob_fields array Fields that represent binary data.
$date_fields array Fields that represent dates. @since 4.2.0

_canAdd() 보호된 메소드

TODO
protected _canAdd ( )

_countDelimiters() 보호된 메소드

Helper function to count the occurances of the ':' * delimiter in group member entries.
protected _countDelimiters ( string $in ) : integer
$in string The group member entry.
리턴 integer The number of ':' in $in.

_delete() 보호된 메소드

Deletes the specified object from the IMSP server.
protected _delete ( $object_key, $object_id )

_deleteAll() 보호된 메소드

Deletes the address book represented by this driver from the IMSP server.
protected _deleteAll ( )

_doSearch() 보호된 메소드

Parses the search criteria, requests the individual searches from the server and performs any necessary ANDs / ORs on the results.
protected _doSearch ( array $criteria, string $glue ) : array
$criteria array Array containing the search criteria.
$glue string Type of search to perform (AND / OR).
리턴 array Array containing contact names that match $criteria.

_getContactOwner() 보호된 메소드

Returns the owner for this contact. For an IMSP source, this should be the name of the address book.
protected _getContactOwner ( ) : string
리턴 string TODO

_getDuplicated() 보호된 메소드

Returns only those names that are duplicated in $names
protected _getDuplicated ( array $names ) : array
$names array A nested array of arrays containing names
리턴 array Array containing the 'AND' of all arrays in $names

_getGroupEmails() 보호된 메소드

Parses out $emailText into an array of pure email addresses suitable for searching the IMSP datastore with.
protected _getGroupEmails ( string $emailText ) : array
$emailText string Single string containing email addressses.
리턴 array Pure email address.

_makeKey() 보호된 메소드

Create an object key for a new object.
protected _makeKey ( array $attributes ) : string
$attributes array The attributes (in driver keys) of the object being added.
리턴 string A unique ID for the new object.

_read() 보호된 메소드

Reads the given data from the address book and returns the results.
protected _read ( string $key, mixed $ids, string $owner, array $fields, array $blobFields = [] ) : array
$key string The primary key field to use (always 'name' for IMSP).
$ids mixed The ids of the contacts to load.
$owner string Only return contacts owned by this user.
$fields array List of fields to return.
$blobFields array Array of fields containing binary data.
리턴 array Hash containing the search results.

_removeDuplicated() 보호된 메소드

Returns an array with all duplicate names removed.
protected _removeDuplicated ( array $names ) : array
$names array Nested array of arrays containing names.
리턴 array Array containg the 'OR' of all arrays in $names.

_save() 보호된 메소드

Saves the specified object to the IMSP server.
protected _save ( Turba_Object $object ) : string
$object Turba_Object The object to save/update.
리턴 string The object id, possibly updated.

_sendSearch() 공개 메소드

Sends a search request to the server.
public _sendSearch ( array $criteria ) : array
$criteria array Array containing the search critera.
리턴 array Array containing a list of names that match the search.

checkDefaultShare() 공개 메소드

Check if the passed in share is the default share for this source.
public checkDefaultShare ( $share, $srcConfig ) : TODO
리턴 TODO

createShare() 공개 메소드

Creates a new Horde_Share and creates the address book on the IMSP server.
public createShare ( $share_id, $params ) : Horde_Share
리턴 Horde_Share The share object.

hasPermission() 공개 메소드

Checks if the current user has the requested permission on this source.
public hasPermission ( integer $perm ) : boolean
$perm integer The permission to check for.
리턴 boolean true if user has permission, false otherwise.

프로퍼티 상세

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

Holds if we are authenticated.
protected bool $_authenticated
리턴 boolean

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

The name of the addressbook.
protected string $_bookName
리턴 string

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

Driver capabilities.
protected array $_capabilities
리턴 array

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

Holds name of the field indicating an IMSP group.
protected string $_groupField
리턴 string

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

Holds value that $_groupField will have if entry is an IMSP group.
protected string $_groupValue
리턴 string

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

Horde_Imsp object
protected Horde_Imsp $_imsp
리턴 Horde_Imsp

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

Used to set if the current search is for contacts only.
protected bool $_noGroups
리턴 boolean