Class Horde_Kolab_Server

Description

This class provides methods to deal with Kolab objects stored in the Kolab object db.

$Horde: framework/Kolab_Server/lib/Horde/Kolab/Server.php,v 1.2.2.9 2009/04/25 08:56:34 wrobel Exp $

Copyright 2008-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 /Kolab_Server/lib/Horde/Kolab/Server.php (line 44)


	
			
Direct descendents
Class Description
 class Horde_Kolab_Server_ldap This class provides methods to deal with Kolab objects stored in the standard Kolab LDAP db.
Variable Summary
 string $uid
 array $valid_types
 array $_params
Method Summary
 Horde_Kolab_Server Horde_Kolab_Server ([array $params = array()])
 Kolab_Object|PEAR_Error &add (array $info)
 array|PEAR_Error addrsForIdOrMail (string $user)
 Horde_Kolab_Server|PEAR_Error &factory (mixed $driver, [array $params = array()])
 Kolab_Object|PEAR_Error &fetch ([string $uid = null], [string $type = null])
 string|PEAR_Error generateUid (string $type, array $info)
 string getBaseUid ()
 array|PEAR_Error getGroups (string $uid)
 mixed|PEAR_Error gidForAttr (string $attr, string $value, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 mixed|PEAR_Error gidForMail (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 array|PEAR_Error listHash (string $type, [array $params = null])
 array|PEAR_Error listObjects (string $type, [array $params = null])
 mixed|PEAR_Error mailForIdOrMail (string $id)
 boolean|PEAR_Error memberOfGroupAddress (string $uid, string $mail)
 array|PEAR_Error read (string $uid, [string $attrs = null])
 array|PEAR_Error save (string $uid, string $data)
 Horde_Kolab_Server|PEAR_Error &singleton ([array $params = null])
 Kolab_Object|PEAR_Error &store (string $type, array $info, [string $uid = null])
 mixed|PEAR_Error uidForAlias (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 mixed|PEAR_Error uidForAttr (string $attr, string $value, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 mixed|PEAR_Error uidForId (string $id, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 mixed|PEAR_Error uidForIdOrMail (string $id)
 mixed|PEAR_Error uidForMail (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
 mixed|PEAR_Error uidForMailAddress (string $mail)
 mixed|PEAR_Error uidForMailOrAlias (string $mail)
 mixed|PEAR_Error uidForMailOrIdOrAlias (string $id)
 string _determineType (string $uid)
 string|PEAR_Error _generateUid (string $type, string $id, array $info)
 array|PEAR_Error _listObjects (string $type, [array $params = null])
 array|PEAR_Error _read (string $uid, [string $attrs = null])
Variables
string $uid (line 58)

The UID of the current user.

array $valid_types = array(
KOLAB_OBJECT_ADDRESS,
KOLAB_OBJECT_ADMINISTRATOR,
KOLAB_OBJECT_DISTLIST,
KOLAB_OBJECT_DOMAINMAINTAINER,
KOLAB_OBJECT_GROUP,
KOLAB_OBJECT_MAINTAINER,
KOLAB_OBJECT_SERVER,
KOLAB_OBJECT_SHAREDFOLDER,
KOLAB_OBJECT_USER,
)
(line 65)

Valid Kolab object types

array $_params = array() (line 51)

Server parameters.

Methods
Constructor Horde_Kolab_Server (line 82)

Construct a new Horde_Kolab_Server object.

Horde_Kolab_Server Horde_Kolab_Server ([array $params = array()])
  • array $params: Parameter array.
add (line 256)

Add a Kolab object.

  • return: The newly created Kolab object.
Kolab_Object|PEAR_Error &add (array $info)
  • array $info: The object to store.
addrsForIdOrMail (line 400)

Returns a list of allowed email addresses for the given user.

  • return: An array of allowed mail addresses.
array|PEAR_Error addrsForIdOrMail (string $user)
  • string $user: The user name.

Redefined in descendants as:
factory (line 103)

Attempts to return a concrete Horde_Kolab_Server instance based on $driver.

  • return: The newly created concrete Horde_Kolab_Server instance.
Horde_Kolab_Server|PEAR_Error &factory (mixed $driver, [array $params = array()])
  • mixed $driver: The type of concrete Horde_Kolab_Server subclass to return.
  • array $params: A hash containing any additional configuration or connection parameters a subclass might need.
fetch (line 228)

Fetch a Kolab object.

  • return: The corresponding Kolab object.
Kolab_Object|PEAR_Error &fetch ([string $uid = null], [string $type = null])
  • string $uid: The UID of the object to fetch.
  • string $type: The type of the object to fetch.
generateUid (line 646)

Generates a unique ID for the given information.

  • return: The UID.
string|PEAR_Error generateUid (string $type, array $info)
  • string $type: The type of the object to create.
  • array $info: Any additional information about the object to create.
getBaseUid (line 215)

Return the root of the UID values on this server.

  • return: The base UID on this server (base DN on ldap).
string getBaseUid ()

Redefined in descendants as:
getGroups (line 322)

Get the groups for this object

  • return: An array of group ids.
array|PEAR_Error getGroups (string $uid)
  • string $uid: The UID of the object to fetch.

Redefined in descendants as:
gidForAttr (line 446)

Identify the GID for the first group found using a specified attribute value.

  • return: The GID or false if there was no result.
mixed|PEAR_Error gidForAttr (string $attr, string $value, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $attr: The name of the attribute used for searching.
  • string $value: The desired value of the attribute.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.

Redefined in descendants as:
gidForMail (line 504)

Identify the GID for the first group found with the given mail.

  • return: The GID or false if there was no result.
mixed|PEAR_Error gidForMail (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $mail: Search for groups with this mail address.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.
listHash (line 586)

Generate a hash representation for a list of objects.

  • return: An array of Kolab objects.
array|PEAR_Error listHash (string $type, [array $params = null])
  • string $type: The type of the objects to be listed
  • array $params: Additional parameters.
listObjects (line 615)

List all objects of a specific type

  • return: An array of Kolab objects.
array|PEAR_Error listObjects (string $type, [array $params = null])
  • string $type: The type of the objects to be listed
  • array $params: Additional parameters.
mailForIdOrMail (line 387)

Identify the primary mail attribute for the first object found with the given ID or mail.

  • return: The mail address or false if there was no result.
mixed|PEAR_Error mailForIdOrMail (string $id)
  • string $id: Search for objects with this ID/mail.

Redefined in descendants as:
memberOfGroupAddress (line 462)

Is the given UID member of the group with the given mail address?

  • return: True in case the user is in the group, false otherwise.
boolean|PEAR_Error memberOfGroupAddress (string $uid, string $mail)
  • string $uid: UID of the user.
  • string $mail: Search the group with this mail address.

Redefined in descendants as:
read (line 335)

Read object data.

  • return: An array of attributes.
array|PEAR_Error read (string $uid, [string $attrs = null])
  • string $uid: The object to retrieve.
  • string $attrs: Restrict to these attributes.
save (line 361)

Stub for saving object data.

  • return: An array of attributes.
array|PEAR_Error save (string $uid, string $data)
  • string $uid: The object to save.
  • string $data: The data of the object.

Redefined in descendants as:
singleton (line 142)

Attempts to return a reference to a concrete Horde_Kolab_Server instance based on $driver. It will only create a new instance if no Horde_Kolab_Server instance with the same parameters currently exists.

This method must be invoked as: $var = &Horde_Kolab_Server::singleton()

  • return: The concrete Horde_Kolab_Server reference.
Horde_Kolab_Server|PEAR_Error &singleton ([array $params = null])
  • array $params: An array of optional login parameters. May contain "uid" (for the login uid), "user" (if the uid is not yet known), and "pass" (for a password).
store (line 297)

Update or create a Kolab object.

  • return: The updated Kolab object.
Kolab_Object|PEAR_Error &store (string $type, array $info, [string $uid = null])
  • string $type: The type of the object to store.
  • array $info: Any additional information about the object to store.
  • string $uid: The unique id of the object to store.
uidForAlias (line 534)

Identify the UID for the first object found with the given alias.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForAlias (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $mail: Search for objects with this mail alias.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.
uidForAttr (line 429)

Identify the UID for the first user found using a specified attribute value.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForAttr (string $attr, string $value, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $attr: The name of the attribute used for searching.
  • string $value: The desired value of the attribute.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.

Redefined in descendants as:
uidForId (line 476)

Identify the UID for the first object found with the given ID.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForId (string $id, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $id: Search for objects with this ID.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.
uidForIdOrMail (line 517)

Identify the UID for the first object found with the given ID or mail.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForIdOrMail (string $id)
  • string $id: Search for objects with this uid/mail.

Redefined in descendants as:
uidForMail (line 490)

Identify the UID for the first user found with the given mail.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForMail (string $mail, [int $restrict = KOLAB_SERVER_RESULT_SINGLE])
  • string $mail: Search for users with this mail address.
  • int $restrict: A KOLAB_SERVER_RESULT_* result restriction.
uidForMailAddress (line 413)

Return the UID for a given primary mail, uid, or alias.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForMailAddress (string $mail)
  • string $mail: A valid mail address for the user.

Redefined in descendants as:
uidForMailOrAlias (line 549)

Identify the UID for the first object found with the given mail address or alias.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForMailOrAlias (string $mail)
  • string $mail: Search for objects with this mail address or alias.
uidForMailOrIdOrAlias (line 566)

Identify the UID for the first object found with the given ID, mail or alias.

  • return: The UID or false if there was no result.
mixed|PEAR_Error uidForMailOrIdOrAlias (string $id)
  • string $id: Search for objects with this ID/mail/alias.
_determineType (line 373)

Determine the type of a Kolab object.

  • return: The corresponding Kolab object type.
string _determineType (string $uid)
  • string $uid: The UID of the object to examine.

Redefined in descendants as:
_generateUid (line 671)

Generates a UID for the given information.

  • return: The UID.
string|PEAR_Error _generateUid (string $type, string $id, array $info)
  • string $type: The type of the object to create.
  • string $id: The id of the object.
  • array $info: Any additional information about the object to create.

Redefined in descendants as:
_listObjects (line 633)

List all objects of a specific type

  • return: An array of Kolab objects.
array|PEAR_Error _listObjects (string $type, [array $params = null])
  • string $type: The type of the objects to be listed
  • array $params: Additional parameters.

Redefined in descendants as:
_read (line 348)

Stub for reading object data.

  • return: An array of attributes.
array|PEAR_Error _read (string $uid, [string $attrs = null])
  • string $uid: The object to retrieve.
  • string $attrs: Restrict to these attributes.

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:21:10 +0000 by phpDocumentor 1.4.3