Class Net_IMSP_Utils

Description

Net_IMSP_Utils::

$Horde: framework/Net_IMSP/IMSP/Utils.php,v 1.3.10.11 2009/01/06 15:23:27 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Net_IMSP/IMSP/Utils.php (line 16)


	
			
Method Summary
 mixed createBook (array $source, string $newName)
 mixed deleteBook (array $source)
 array getAllBooks (array $serverInfo)
 string permsToACL (integer $perms)
 mixed setACL ( $params, string $book, string $name, string $acl)
 mixed synchShares ( &$share_obj, array $serverInfo, Horde_Share $share_obj)
 mixed _createShare (Horde_Share &$share_obj, array $params,  $shareparams)
 boolean _isOwner ( $bookName,  $username,  $acl, array $params)
 void _setPerms ( &$share, string $acl, Datatree_Object_Share $share)
Methods
createBook (line 116)

Utility function to help clients create new address books without having to create an imsp driver instance first.

  • return: true on success or PEAR_Error on failure.
mixed createBook (array $source, string $newName)
  • array $source: Information about the user's default IMSP address book.
  • string $newName: The name of the new address book.
deleteBook (line 82)

Utility function to make it easier for client applications to delete address books without having to create imsp drivers. The $source array is a horde/turba style $cfgSources entry for the address book being deleted.

  • return: True on success or PEAR_Error on failure.
mixed deleteBook (array $source)
  • array $source: Information about the address book being deleted.
getAllBooks (line 30)

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.

  • return: Information about all the address books or PEAR_Error.
array getAllBooks (array $serverInfo)
  • array $serverInfo: Information about the server and the current user.
permsToACL (line 316)

Translates Horde_Share permissions into IMSP acl.

  • return: An IMSP acl string
  • since: Horde 3.2
string permsToACL (integer $perms)
  • integer $perms: Horde_Perms style permission bitmask.
setACL (line 345)

Set's an address book's acl on the IMSP server.

  • return: True | Pear_Error
  • since: Horde 3.2
mixed setACL ( $params, string $book, string $name, string $acl)
  • string $book: The address book name to set
  • string $name: The user name to set for.
  • string $acl: The acl string to set.
  • $params
synchShares (line 148)

Synchronize Horde_Shares to existing IMSP address books.

  • return: Array describing any shares added or removed | PEAR_Error.
  • since: Horde 3.2
mixed synchShares ( &$share_obj, array $serverInfo, Horde_Share $share_obj)
  • Horde_Share $share_obj: The Horde_Share object to use.
  • array $serverInfo: Information about the IMSP server and the current user.
  • &$share_obj
_createShare (line 250)

Creates a Horde_Share for an *existing* IMSP address book.

Needed for creating shares for address books created outside of Horde.

  • return: True | PEAR_Error
  • since: Horde 3.2
mixed _createShare (Horde_Share &$share_obj, array $params,  $shareparams)
  • Horde_Share &$share_obj: The share object to create the new share with.
  • array $params: Parameters for the share
  • $shareparams
_isOwner (line 273)

Determine if we are the owner of the address book.

Assumes ownership if username is beginning address book name or if user has admin rights ('a') in acl.

  • return: True if $user is owner, otherwise false.
  • since: Horde 3.2
boolean _isOwner ( $bookName,  $username,  $acl, array $params)
  • array $params: Parameters to check for ownership.
  • $bookName
  • $username
  • $acl
_setPerms (line 290)

Translates IMSP acl into share permissions and sets them in share.

  • since: Horde 3.2
void _setPerms ( &$share, string $acl, Datatree_Object_Share $share)
  • Datatree_Object_Share $share: The share to assign perms to
  • string $acl: The IMSP acl string.
  • &$share

Documentation generated on Sun, 30 Jan 2011 05:23:06 +0000 by phpDocumentor 1.4.3