PHP Class Horde_Imsp_Book, horde

Copyright 2002-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.
Author: Michael J Rubinsky ([email protected])
Afficher le fichier Open project: horde/horde

Méthodes publiques

Свойство Type Description
$sort string Sort order.

Protected Properties

Свойство Type Description
$_imsp Horde_Imsp_Client_Base Horde_Imsp_Client object.
$_params array Parameter list.

Méthodes publiques

Méthode Description
__construct ( Horde_Imsp_Client_Base $client, array $params ) Constructor function.
addEntry ( string $abook, array $entryInfo ) Adds an address book entry to an address book.
createAddressBook ( string $abookName ) Creates a new address book.
deleteACL ( string $abook, string $ident ) Deletes an ACL entry for an address book.
deleteAddressBook ( string $abookName ) Deletes an address book completely!
deleteEntry ( string $abook, string $bookEntry ) Deletes an abook entry.
getACL ( string $abook ) : mixed Retrieves an address book's ACL.
getAddressBookList ( ) : mixed Returns an array containing the names of all the address books available to the logged in user.
getEntry ( string $abook, string $entryName ) : array Returns an associative array of a single address book entry.
lockEntry ( string $abook, string $bookEntry ) : mixed Attempts to acquire a semaphore on the address book entry.
myRights ( string $abook ) : mixed Returns an ACL string containing the rights for the current user
renameAddressBook ( string $abookOldName, string $abookNewName ) Renames an address book.
search ( string $abook, mixed $search ) : array Returns an array containing the names that match $search critera in the address book named $abook.
setACL ( string $abook, string $ident, string $acl ) : mixed Sets an Access Control List for an abook.
unlockEntry ( string $abook, string $bookEntry ) Unlocks a previously locked address book.

Méthodes protégées

Méthode Description
_parseFetchAddressResponse ( string $server_response ) : array Parses a IMSP fetchaddress response text string into key-value pairs

Method Details

__construct() public méthode

Constructor function.
public __construct ( Horde_Imsp_Client_Base $client, array $params )
$client Horde_Imsp_Client_Base
$params array Hash containing IMSP parameters.

_parseFetchAddressResponse() protected méthode

Parses a IMSP fetchaddress response text string into key-value pairs
protected _parseFetchAddressResponse ( string $server_response ) : array
$server_response string The raw fetchaddress response.
Résultat array Address book entry information as key=>value pairs.

addEntry() public méthode

Adds an address book entry to an address book.
public addEntry ( string $abook, array $entryInfo )
$abook string Name of address book to add entry to.
$entryInfo array Address book entry information - there MUST be a field 'name' containing the entry name.

createAddressBook() public méthode

Creates a new address book.
public createAddressBook ( string $abookName )
$abookName string FULLY QUALIFIED name such 'jdoe.clients' etc...

deleteACL() public méthode

Deletes an ACL entry for an address book.
public deleteACL ( string $abook, string $ident )
$abook string Name of the address book.
$ident string Name of entry to remove acl for.

deleteAddressBook() public méthode

Deletes an address book completely!
public deleteAddressBook ( string $abookName )
$abookName string Name of address book to delete.

deleteEntry() public méthode

Deletes an abook entry.
public deleteEntry ( string $abook, string $bookEntry )
$abook string Name of address book containing entry.
$bookEntry string Name of entry to delete.

getACL() public méthode

Retrieves an address book's ACL.
public getACL ( string $abook ) : mixed
$abook string Name of address book to retrieve acl for.
Résultat mixed array containing acl for every user with access to address book or PEAR_Error on failure.

getAddressBookList() public méthode

Returns an array containing the names of all the address books available to the logged in user.
public getAddressBookList ( ) : mixed
Résultat mixed Array of address book names

getEntry() public méthode

Note that there will always be a 'name' field.
public getEntry ( string $abook, string $entryName ) : array
$abook string Name of the address book to search.
$entryName string 'name' attribute of the entry to retrieve
Résultat array Array containing entry.

lockEntry() public méthode

Attempts to acquire a semaphore on the address book entry.
public lockEntry ( string $abook, string $bookEntry ) : mixed
$abook string Address book name
$bookEntry string Name of entry to lock
Résultat mixed true or array on success (depends on server in use).

myRights() public méthode

Returns an ACL string containing the rights for the current user
public myRights ( string $abook ) : mixed
$abook string Name of address book to retrieve acl.
Résultat mixed acl of current user.

renameAddressBook() public méthode

Renames an address book.
public renameAddressBook ( string $abookOldName, string $abookNewName )
$abookOldName string Old name.
$abookNewName string New address book name.

setACL() public méthode

Sets an Access Control List for an abook.
public setACL ( string $abook, string $ident, string $acl ) : mixed
$abook string Name of address book.
$ident string Name of user for this acl.
$acl string acl for this user/book.
Résultat mixed True on success / PEAR_Error on failure.

unlockEntry() public méthode

Unlocks a previously locked address book.
public unlockEntry ( string $abook, string $bookEntry )
$abook string Name of address book containing locked entry.
$bookEntry string Name of entry to unlock.

Property Details

$_imsp protected_oe property

Horde_Imsp_Client object.
protected Horde_Imsp_Client_Base $_imsp
Résultat Horde_Imsp_Client_Base

$_params protected_oe property

Parameter list.
protected array $_params
Résultat array

$sort public_oe property

Sort order.
public string $sort
Résultat string