\Horde_Kolab_Server_Structure_Ldap

This class provides methods to deal with the LDAP tree structure.

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
find()
findBelow()
setComposite()
getComposite()
getExternalAttributes()
getInternalAttributes()
getInternalAttributesForExternal()
getSupportedObjects()
getSearchOperations()
determineType()
generateServerGuid()
getExternalAttribute()
mapExternalToInternalAttribute()
mapExternalToInternalAttributes()
No public properties found
MAX_HIERARCHY
_determineType()
getObjectClasses()
No protected properties found
N/A
_mapExternalToInternal()
$_composite
N/A

Constants

MAX_HIERARCHY

MAX_HIERARCHY

Maximum accepted level for the object class hierarchy

Properties

Methods

find()

find(\Horde_Kolab_Server_Query_Element  $criteria, array  $params = array()) : \Horde_Kolab_Server_Result

Finds object data matching a given set of criteria.

Parameters

\Horde_Kolab_Server_Query_Element $criteria

The criteria for the search.

array $params

Additional search parameters.

Throws

\Horde_Kolab_Server_Exception

Returns

\Horde_Kolab_Server_Result —

The result object.

findBelow()

findBelow(\Horde_Kolab_Server_Query_Element  $criteria, string  $parent, array  $params = array()) : \Horde_Kolab_Server_Result

Finds all object data below a parent matching a given set of criteria.

Parameters

\Horde_Kolab_Server_Query_Element $criteria

The criteria for the search.

string $parent

The parent to search below.

array $params

Additional search parameters.

Throws

\Horde_Kolab_Server_Exception

Returns

\Horde_Kolab_Server_Result —

The result object.

setComposite()

setComposite(\Horde_Kolab_Server_Composite  $composite) : NULL

Set the composite server reference for this object.

Parameters

\Horde_Kolab_Server_Composite $composite

A link to the composite server handler.

Returns

NULL

getComposite()

getComposite() : \Horde_Kolab_Server_Composite

Get the composite server reference for this object.

Returns

\Horde_Kolab_Server_Composite

A link to the composite server handler.

getExternalAttributes()

getExternalAttributes(string  $class) : array

Return the attributes supported by the given object class.

Parameters

string $class

Determine the attributes for this class.

Throws

\Horde_Kolab_Server_Exception

If the schema analysis fails.

Returns

array —

The supported attributes.

getInternalAttributes()

getInternalAttributes(  $class) : array

Return the internal attributes supported by the given object class.

Parameters

$class

Returns

array —

The supported attributes.

getInternalAttributesForExternal()

getInternalAttributesForExternal(  $class,   $external) 

Parameters

$class
$external

getSupportedObjects()

getSupportedObjects() : array

Returns the set of objects supported by this structure.

Returns

array —

An array of supported objects.

getSearchOperations()

getSearchOperations() : array

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

Returns

array —

An array of supported search operations.

determineType()

determineType(string  $guid) : string

Determine the type of an object by its tree position and other parameters.

Parameters

string $guid

The GUID of the object to examine.

Throws

\Horde_Kolab_Server_Exception

If the object type is unknown.

Returns

string —

The class name of the corresponding object type.

generateServerGuid()

generateServerGuid(string  $type, string  $id, array  $info) : string

Generates a GUID for the given information.

Parameters

string $type

The class name of the object to create.

string $id

The id of the object.

array $info

Any additional information about the object to create.

Returns

string —

The GUID.

mapExternalToInternalAttribute()

mapExternalToInternalAttribute(string  $external) : string

Maps the external attribute name to its internal counterpart.

Parameters

string $external

The external attribute name.

Returns

string —

The internal attribute name.

mapExternalToInternalAttributes()

mapExternalToInternalAttributes(string  $external) : string

Maps the external attribute names to their internal counterparts.

Parameters

string $external

The external attribute names.

Returns

string —

The internal attribute names.

_determineType()

_determineType(string  $guid, array  $ocs) : string

Determine the type of an object by its tree position and other parameters.

Parameters

string $guid

The GUID of the object to examine.

array $ocs

The object classes of the object to examine.

Throws

\Horde_Kolab_Server_Exception

If the object type is unknown.

Returns

string —

The class name of the corresponding object type.

getObjectClasses()

getObjectClasses(string  $guid) : array

Get the LDAP object classes for the given GUID.

This is meant to be a shortcut for the structure handler. It should be used when determining the object type.

Parameters

string $guid

GUID of the object.

Throws

\Horde_Kolab_Server_Exception

If the object has no object classes.

Returns

array —

An array of object classes.

_mapExternalToInternal()

_mapExternalToInternal(string  $external) : string

Maps the external attribute name to its internal counterpart(s).

Parameters

string $external

The external attribute name.

Returns

string —

The internal attribute name(s).