public function SimpleLdapSchema::attributes in Simple LDAP 7
Same name and namespace in other branches
- 7.2 SimpleLdapSchema.class.php \SimpleLdapSchema::attributes()
Return a list of attributes defined for the objectclass.
@throw SimpleLdapException
Parameters
string $objectclass: The objectclass to query for attributes.
boolean $recursive: If TRUE, the attributes of the parent objectclasses will also be retrieved.
Return value
array A list of the MAY/MUST attributes.
File
- ./
SimpleLdapSchema.class.php, line 185 - Class to represent an LDAP server schema.
Class
- SimpleLdapSchema
- Simple LDAP Schema class.
Code
public function attributes($objectclass, $recursive = FALSE) {
$may = $this
->may($objectclass, $recursive);
if (!is_array($may)) {
$may = array();
}
$must = $this
->must($objectclass, $recursive);
if (!is_array($must)) {
$must = array();
}
$attributes = array_merge($may, $must);
return $attributes;
}