public function SimpleLdapSchema::superclass in Simple LDAP 7
Same name and namespace in other branches
- 7.2 SimpleLdapSchema.class.php \SimpleLdapSchema::superclass()
Returns the objectclass's superclass.
File
- ./
SimpleLdapSchema.class.php, line 265 - Class to represent an LDAP server schema.
Class
- SimpleLdapSchema
- Simple LDAP Schema class.
Code
public function superclass($objectclass, $recursive = FALSE) {
if ($oc = $this
->get('objectclasses', $objectclass)) {
$superclass = array();
if (isset($oc['sup'])) {
$superclass = $oc['sup'];
if ($recursive) {
foreach ($oc['sup'] as $sup) {
$superclass = array_merge($superclass, $this
->superclass($sup, TRUE));
}
}
}
return $superclass;
}
return FALSE;
}