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])
ファイルを表示 Open project: horde/horde

Public Properties

Property Type Description
$sort string Sort order.

Protected Properties

Property Type Description
$_imsp Horde_Imsp_Client_Base Horde_Imsp_Client object.
$_params array Parameter list.

Public Methods

Method 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.

Protected Methods

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

Method Details

__construct() public method

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

_parseFetchAddressResponse() protected method

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

addEntry() public method

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 method

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

deleteACL() public method

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 method

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

deleteEntry() public method

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 method

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

getAddressBookList() public method

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

getEntry() public method

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
return array Array containing entry.

lockEntry() public method

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
return mixed true or array on success (depends on server in use).

myRights() public method

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.
return mixed acl of current user.

renameAddressBook() public method

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

setACL() public method

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.
return mixed True on success / PEAR_Error on failure.

unlockEntry() public method

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
return Horde_Imsp_Client_Base

$_params protected_oe property

Parameter list.
protected array $_params
return array

$sort public_oe property

Sort order.
public string $sort
return string