Overview

Packages

  • Horde
    • Imsp

Classes

  • Horde_Imsp_Auth_Base
  • Horde_Imsp_Auth_CramMd5
  • Horde_Imsp_Auth_Imtest
  • Horde_Imsp_Auth_Plaintext
  • Horde_Imsp_Book
  • Horde_Imsp_Client_Base
  • Horde_Imsp_Client_Socket
  • Horde_Imsp_Exception
  • Horde_Imsp_Options
  • Horde_Imsp_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Imsp_Book

Horde_Imsp_Book Class - provides api for dealing with IMSP address books.

Copyright 2002-2012 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.

Package: Horde\Imsp
Author: Michael J Rubinsky mrubinsk@horde.org
Located at Horde/Imsp/Book.php
Methods summary
public
# __construct( Horde_Imsp_Client_Base $client, array $params )

Constructor function.

Constructor function.

Parameters

$client
$params Hash containing IMSP parameters.
$params
public mixed
# getAddressBookList( )

Returns an array containing the names of all the address books available to the logged in user.

Returns an array containing the names of all the address books available to the logged in user.

Returns

mixed
Array of address book names
public array
# search( string $abook, mixed $search )

Returns an array containing the names that match $search critera in the address book named $abook.

Returns an array containing the names that match $search critera in the address book named $abook.

Parameters

$abook
Address book name to search.
$search
<p>Search criteria either a string (name) or an array in the form of 'fieldName' => 'searchTerm'.</p>

Returns

array
Array of names of the entries that match.

Throws

Horde_Imsp_Exception
public array
# getEntry( string $abook, string $entryName )

Returns an associative array of a single address book entry. Note that there will always be a 'name' field.

Returns an associative array of a single address book entry. Note that there will always be a 'name' field.

Parameters

$abook
Name of the address book to search.
$entryName
'name' attribute of the entry to retrieve

Returns

array
Array containing entry.

Throws

Horde_Imsp_Exception
Horde_Exception_NotFound
public
# createAddressBook( string $abookName )

Creates a new address book.

Creates a new address book.

Parameters

$abookName
FULLY QUALIFIED name such 'jdoe.clients' etc...

Throws

Horde_Imsp_Exception
public
# deleteAddressBook( string $abookName )

Deletes an address book completely!

Deletes an address book completely!

Parameters

$abookName
Name of address book to delete.

Throws

Horde_Imsp_Exception
public
# renameAddressBook( string $abookOldName, string $abookNewName )

Renames an address book.

Renames an address book.

Parameters

$abookOldName
Old name.
$abookNewName
New address book name.

Throws

Horde_Imsp_Exception
public
# addEntry( string $abook, array $entryInfo )

Adds an address book entry to an address book.

Adds an address book entry to an address book.

Parameters

$abook
Name of address book to add entry to.
$entryInfo
<p>Address book entry information - there MUST be a field 'name' containing the entry name.</p>

Throws

Horde_Imsp_Exception
public
# deleteEntry( string $abook, string $bookEntry )

Deletes an abook entry.

Deletes an abook entry.

Parameters

$abook
Name of address book containing entry.
$bookEntry
Name of entry to delete.

Throws

Horde_Imsp_Exception
public mixed
# lockEntry( string $abook, string $bookEntry )

Attempts to acquire a semaphore on the address book entry.

Attempts to acquire a semaphore on the address book entry.

Parameters

$abook
Address book name
$bookEntry
Name of entry to lock

Returns

mixed
true or array on success (depends on server in use).
public
# unlockEntry( string $abook, string $bookEntry )

Unlocks a previously locked address book.

Unlocks a previously locked address book.

Parameters

$abook
Name of address book containing locked entry.
$bookEntry
Name of entry to unlock.

Throws

Horde_Imsp_Exception
public mixed
# setACL( string $abook, string $ident, string $acl )

Sets an Access Control List for an abook.

Sets an Access Control List for an abook.

Parameters

$abook
Name of address book.
$ident
Name of user for this acl.
$acl
acl for this user/book.

Returns

mixed
True on success / PEAR_Error on failure.
public mixed
# getACL( string $abook )

Retrieves an address book's ACL.

Retrieves an address book's ACL.

Parameters

$abook
Name of address book to retrieve acl for.

Returns

mixed

array containing acl for every user with access to address book or PEAR_Error on failure.

public
# deleteACL( string $abook, string $ident )

Deletes an ACL entry for an address book.

Deletes an ACL entry for an address book.

Parameters

$abook
Name of the address book.
$ident
Name of entry to remove acl for.

Throws

Horde_Imsp_Exception
public mixed
# myRights( string $abook )

Returns an ACL string containing the rights for the current user

Returns an ACL string containing the rights for the current user

Parameters

$abook
Name of address book to retrieve acl.

Returns

mixed
acl of current user.
Constants summary
string ACL_RIGHTS

Supported ACLs

Supported ACLs

# 'lrwcda'
Properties summary
public string $sort

Sort order.

Sort order.

# 'ascend'
API documentation generated by ApiGen