Constants

OBJECTCLASS_KOLABINETORGPERSON

OBJECTCLASS_KOLABINETORGPERSON

The specific object class of this object type

OBJECTCLASS_INETORGPERSON

OBJECTCLASS_INETORGPERSON

The specific object class of this object type

ATTRIBUTE_POSTALADDRESS

ATTRIBUTE_POSTALADDRESS

The postal address

ATTRIBUTE_JOBTITLE

ATTRIBUTE_JOBTITLE

The job title

ATTRIBUTE_STREET

ATTRIBUTE_STREET

The street address

ATTRIBUTE_POSTOFFICEBOX

ATTRIBUTE_POSTOFFICEBOX

The post office box

ATTRIBUTE_POSTALCODE

ATTRIBUTE_POSTALCODE

The postal code

ATTRIBUTE_CITY

ATTRIBUTE_CITY

The city

ATTRIBUTE_FAX

ATTRIBUTE_FAX

The fax number

OBJECTCLASS_ORGANIZATIONALPERSON

OBJECTCLASS_ORGANIZATIONALPERSON

The specific object class of this object type

OBJECTCLASS_PERSON

OBJECTCLASS_PERSON

The specific object class of this object type

OBJECTCLASS_TOP

OBJECTCLASS_TOP

Define the possible Kolab object classes

Properties

$attributes

$attributes : array

The attributes defined for this class.

Type

array

$init_attributes

$init_attributes : 

Type

$object_classes

$object_classes : 

Type

$sort_by

$sort_by : string

Sort by this attributes.

Type

string

$required_group

$required_group : string

The group the UID must be member of so that this object really matches this class type. This may not include the root UID.

Type

string

$guid

$guid : string

GUID of this object on the Kolab server.

Type

string

Methods

generateId()

generateId(array  $info) : string

Generates an ID for the given information.

Parameters

array $info

The data of the object.

Returns

string —

The ID.

generateCn()

generateCn(array  $info) : string

Generates the common name for the given information.

Parameters

array $info

The data of the object.

Returns

string —

The common name.

prepareObjectInformation()

prepareObjectInformation(array  $info) : \NULL.

Distill the server side object information to save.

Parameters

array $info

Throws

\Horde_Kolab_Server_Exception

If the given information contains errors.

Returns

\NULL.

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.

getExternalAccounts()

getExternalAccounts() : array

List the external pop3 accounts of this object.

Returns

array —

The data of the pop3 accounts.

saveExternalAccount()

saveExternalAccount(array  $account) : NULL

Create/update an external pop3 accounts of this object.

Parameters

array $account

The account data.

Returns

NULL

deleteExternalAccount()

deleteExternalAccount(string  $mail) : NULL

Delete an external account.

Parameters

string $mail

The mail address of the pop3 account.

Returns

NULL

getServer()

getServer(string  $server_type) : string

Returns the server url of the given type for this user.

This method is used to encapsulate multidomain support.

Parameters

string $server_type

The type of server URL that should be returned.

Returns

string —

The server url or empty on error.

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) : boolean|\PEAR_Error

Saves object information.

Parameters

array $info

The information about the object.

Returns

boolean|\PEAR_Error —

True on success.

delete()

delete() : NULL

Delete this object.

Throws

\Horde_Kolab_Server_Exception

If deleting the object failed.

Returns

NULL

getFnLn()

getFnLn() : string

Get the name of this Object as "Firstname Lastname".

Returns

string —

The name.

getLnFn()

getLnFn() : string

Get the name of this Object as "Lastname, Firstname".

Returns

string —

The name.

getLabeledUriHash()

getLabeledUriHash() : array

Return a hash of URIs. The keys of the hash are the labels.

Returns

array —

The URIs.

setLabeledUriHash()

setLabeledUriHash(string  $key, array  $attributes,   $info) : NULL

Store a hash of URIs. The keys of the hash are the labels.

Parameters

string $key

The attribute to collapse into.

array $attributes

The attributes to collapse.

$info

Returns

NULL

getHomePostalAddressHash()

getHomePostalAddressHash() : array

Get home postal addresses as an array.

Returns

array —

The home addressses.

setHomePostalAddressHash()

setHomePostalAddressHash(string  $key, array  $attributes,   $info) : NULL

Store home postal addresses provided as array.

Parameters

string $key

The attribute to collapse into.

array $attributes

The attributes to collapse.

$info

Returns

NULL

setPostalAddress()

setPostalAddress(string  $key, array  $attributes,   $info) : \NULL.

Set the complete postal address.

Parameters

string $key

The attribute to collapse into.

array $attributes

The attributes to collapse.

$info

Returns

\NULL.

hashPassword()

hashPassword(string  $password) : string

Salt and hash the password.

Parameters

string $password

The password.

Returns

string —

The salted hashed password.

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