You are here

function SimpleLdapSchema::auxiliary in Simple LDAP 7.2

Return a list of auxiliary object classes.

Parameters

string $attribute: If specified, return just the named attribute instead of the whole objectClass definition.

Return value

array A list of auxiliary classes keyed by the classname.

File

./SimpleLdapSchema.class.php, line 206
Class to represent an LDAP server schema.

Class

SimpleLdapSchema
Simple LDAP Schema class.

Code

function auxiliary($attribute = NULL) {
  $object_classes = $this
    ->get('objectclasses');
  $auxiliary = array();
  foreach ($object_classes as $key => $objectclass) {
    if (!empty($objectclass['auxiliary'])) {
      $auxiliary[$key] = $attribute ? $objectclass[$attribute] : $objectclass;
    }
  }
  return $auxiliary;
}