Constants

OBJECTCLASS_GROUPOFNAMES

OBJECTCLASS_GROUPOFNAMES

The specific object class of this object type

ATTRIBUTE_CN

ATTRIBUTE_CN

The common name

ATTRIBUTE_MEMBER

ATTRIBUTE_MEMBER

The members of this group

OBJECTCLASS_TOP

OBJECTCLASS_TOP

Define the possible Kolab object classes

ATTRIBUTE_VISIBILITY

ATTRIBUTE_VISIBILITY

The visibility of the group

ATTRIBUTE_OU

ATTRIBUTE_OU

The ou subtree of the group

ATTRIBUTE_MAIL

ATTRIBUTE_MAIL

The mail address of this group

OBJECTCLASS_KOLABGROUPOFNAMES

OBJECTCLASS_KOLABGROUPOFNAMES

The specific object class of this object type

Properties

$init_attributes

$init_attributes : array

A structure to initialize the attribute structure for this class.

Type

array

$attributes

$attributes : array

The attributes defined for this class.

Type

array

$object_classes

$object_classes : 

Type

$sort_by

$sort_by : string

Sort by this attributes.

Type

string

$guid

$guid : string

GUID of this object on the Kolab server.

Type

string

Methods

getFilter()

getFilter() : string

Return the filter string to retrieve this object type.

Returns

string —

The filter to retrieve this object type from the server database.

generateId()

generateId(array  $info) : string|\PEAR_Error

Generates an ID for the given information.

Parameters

array $info

The data of the object.

Returns

string|\PEAR_Error —

The ID.

getMembers()

getMembers() : array|\PEAR_Error

Retrieve the member list for this group.

Returns

array|\PEAR_Error —

The list of members in this group.

addMember()

addMember(string  $member) : array|\PEAR_Error

Add a member to this group.

Parameters

string $member

The UID of the member to add.

Returns

array|\PEAR_Error —

True if successful.

deleteMember()

deleteMember(string  $member) : array|\PEAR_Error

Delete a member from this group.

Parameters

string $member

The UID of the member to delete.

Returns

array|\PEAR_Error —

True if successful.

isMember()

isMember(string  $member) : boolean|\PEAR_Error

Is the specified UID member of this group?

Parameters

string $member

The UID of the member to check.

Returns

boolean|\PEAR_Error —

True if the UID is a member of the group, false otherwise.

prepareObjectInformation()

prepareObjectInformation(array  $info) : \NULL.

Distill the server side object information to save.

Parameters

array $info

The information about the object.

Throws

\Horde_Kolab_Server_Exception

If the given information contains errors.

Returns

\NULL.

getActions()

getActions() : array

Returns the set of actions supported by this object type.

Returns

array —

An array of supported actions.

__construct()

__construct(\Horde_Kolab_Server_Composite  $composite, string  $guid = null) 

Initialize the Kolab Object. Provide either the GUID

Parameters

\Horde_Kolab_Server_Composite $composite

The link to the Kolab server.

string $guid

GUID of the object.

getGuid()

getGuid() : string

Get the GUID of this object

Returns

string —

the GUID of this object

getExternalAttributes()

getExternalAttributes() : array

Get the external attributes supported by this object.

Returns

array —

The external attributes supported by this object. This is a list of abbreviated attribute class names.

getInternalAttributes()

getInternalAttributes() : array

Get the internal attributes supported by this object.

Returns

array —

The internal attributes supported by this object.

exists()

exists() : boolean

Does the object exist?

Returns

boolean —

True if the object exists, false otherwise.

readInternal()

readInternal() : array

Read the object data.

Returns

array —

The read data.

getInternal()

getInternal(array  $attributes) : array

Get the specified internal attributes.

Parameters

array $attributes

The internal attribute.

Returns

array —

The value(s) of these attribute

getExternal()

getExternal(string  $attr) : mixed

Get the specified attribute of this object.

Parameters

string $attr

The attribute to read.

Returns

mixed —

The value of this attribute.

save()

save(array  $info) : NULL

Saves object information. This may either create a new entry or modify an existing entry.

Please note that fields with multiple allowed values require the callee to provide the full set of values for the field. Any old values that are not resubmitted will be considered to be deleted.

Parameters

array $info

The information about the object.

Throws

\Horde_Kolab_Server_Exception

If saving the data failed.

Returns

NULL

delete()

delete() : NULL

Delete this object.

Throws

\Horde_Kolab_Server_Exception

If deleting the object failed.

Returns

NULL

getSearchOperations()

getSearchOperations() : array

Returns the set of search operations supported by this object type.

Returns

array —

An array of supported search operations.

gidForMail()

gidForMail(  $server, string  $mail, integer  $restrict) : mixed

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

Parameters

$server
string $mail

Search for groups with this mail address.

integer $restrict

A Horde_KolabServer::RESULT* result restriction.

Throws

\Horde_Kolab_Server_Exception

Returns

mixed —

The GID or false if there was no result.

memberOfGroupAddress()

memberOfGroupAddress(  $server, string  $uid, string  $mail) : boolean

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

Parameters

$server
string $uid

UID of the user.

string $mail

Search the group with this mail address.

Throws

\Horde_Kolab_Server_Exception

Returns

boolean —

True in case the user is in the group, false otherwise.

getGroupAddresses()

getGroupAddresses(  $server, string  $uid) : array

Get the mail addresses for the group of this object.

Parameters

$server
string $uid

The UID of the object to fetch.

Throws

\Horde_Kolab_Server_Exception

Returns

array —

An array of mail addresses.

getNewInternal()

getNewInternal(array  $info) : NULL

Transform the given data array into the new internal dataset.

Parameters

array $info

The information about the object.

Throws

\Horde_Kolab_Server_Exception

If transforming the data failed.

Returns

NULL

derive()

derive(string  $attr) : mixed

Derive an attribute value.

Parameters

string $attr

The attribute to derive.

Returns

mixed —

The value of the attribute.