Generic parent class for all schema items. A schema item is
an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax. All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.
Represents an LDAP objectClass All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.
Creates a new ObjectClass object given a raw LDAP objectClass string.
Arguments
Name
Type
Description
Default
$class
n/a
$server
n/a
Return value
Type
Description
n/a
n/a
addChildObjectClass(
String
$name,
)
:
boolean
Description
Adds an objectClass to the list of objectClasses that inherit
from this objectClass.
Arguments
Name
Type
Description
Default
$name
String
The name of the objectClass to add
Return value
Type
Description
boolean
Returns true on success or false on failure (objectclass already existed for example)
addMayAttrs(
array
$attr,
)
:
n/a
Description
Behaves identically to addMustAttrs, but it operates on the MAY
attributes of this objectClass.
Arguments
Name
Type
Description
Default
$attr
array
An array of attribute names (strings) to add.
Return value
Type
Description
n/a
n/a
addMustAttrs(
array
$attr,
)
:
n/a
Description
Adds the specified array of attributes to this objectClass' list of
MUST attributes. The resulting array of must attributes will contain
unique members.
Arguments
Name
Type
Description
Default
$attr
array
An array of attribute names (strings) to add.
Return value
Type
Description
n/a
n/a
getChildObjectClasses(
)
:
Array
Description
Returns the array of objectClass names which inherit from this objectClass.
Return value
Type
Description
Array
Names of objectClasses which inherit from this objectClass.
Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMayAttrs in that it returns an array of strings rather than
array of AttributeType objects
Arguments
Name
Type
Description
Default
$parents
array
An array of ObjectClass objects to use when traversing
the inheritance tree. This presents some what of a bootstrapping problem
as we must fetch all objectClasses to determine through inheritance which
attributes this objectClass provides.
false
Return value
Type
Description
array
The array of allowed attribute names (strings).
Tags
Name
Description
see
see
see
getMayAttrs(
array
$parents
= false,
)
:
array
Description
Gets an array of AttributeType objects that entries of this ObjectClass may define. This differs from getMayAttrNames in that it returns an array of AttributeType objects
Arguments
Name
Type
Description
Default
$parents
array
An array of ObjectClass objects to use when traversing
the inheritance tree. This presents some what of a bootstrapping problem
as we must fetch all objectClasses to determine through inheritance which
attributes this objectClass provides.
Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMustAttrs in that it returns an array of strings rather than
array of AttributeType objects
Arguments
Name
Type
Description
Default
$parents
array
An array of ObjectClass objects to use when traversing
the inheritance tree. This presents some what of a bootstrapping problem
as we must fetch all objectClasses to determine through inheritance which
attributes this objectClass provides.
false
Return value
Type
Description
array
The array of allowed attribute names (strings).
Tags
Name
Description
see
see
see
getMustAttrs(
array
$parents
= false,
)
:
array
Description
Gets an array of AttributeType objects that entries of this ObjectClass must define. This differs from getMustAttrNames in that it returns an array of AttributeType objects
Arguments
Name
Type
Description
Default
$parents
array
An array of ObjectClass objects to use when traversing
the inheritance tree. This presents some what of a bootstrapping problem
as we must fetch all objectClasses to determine through inheritance which
attributes this objectClass requires.
false
Return value
Type
Description
array
The array of required AttributeType objects.
Tags
Name
Description
see
see
see
getParents(
)
:
n/a
Description
This will return all our parent ObjectClass Objects
Return value
Type
Description
n/a
n/a
getSupClasses(
)
:
array
Description
Gets the objectClass names from which this objectClass inherits.
Return value
Type
Description
array
An array of objectClass names (strings)
getType(
)
:
n/a
Description
Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY.
Return value
Type
Description
n/a
n/a
isForceMay(
$attr,
)
:
n/a
Description
Determine if an array is listed in the force_may attrs
A simple class for representing AttributeTypes used only by the ObjectClass class. Users should never instantiate this class. It represents an attribute internal to
an ObjectClass. If PHP supported inner-classes and variable permissions, this would
be interior to class ObjectClass and flagged private. The reason this class is used
and not the "real" class AttributeType is because this class supports the notion of
a "source" objectClass, meaning that it keeps track of which objectClass originally
specified it. This class is therefore used by the class ObjectClass to determine
inheritance.
Represents an LDAP AttributeType All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.
Creates a new AttributeType object from a raw LDAP AttributeType string.
Arguments
Name
Type
Description
Default
$attr
n/a
Return value
Type
Description
n/a
n/a
addAlias(
string
$alias,
)
:
n/a
Description
Adds an attribute name to the alias array.
Arguments
Name
Type
Description
Default
$alias
string
The name of a new attribute to add to this attribute's list of aliases.
Return value
Type
Description
n/a
n/a
addRequiredByObjectClass(
string
$name,
)
:
n/a
Description
Adds an objectClass name to this attribute's list of "required by" objectClasses,
that is the list of objectClasses which must have this attribute.
Arguments
Name
Type
Description
Default
$name
string
The name of the objectClass to add.
Return value
Type
Description
n/a
n/a
addUsedInObjectClass(
string
$name,
)
:
n/a
Description
Adds an objectClass name to this attribute's list of "used in" objectClasses,
that is the list of objectClasses which provide this attribute.
Arguments
Name
Type
Description
Default
$name
string
The name of the objectClass to add.
Return value
Type
Description
n/a
n/a
getAliases(
)
:
array
Description
Gets the names of attributes that are an alias for this attribute (if any).
Return value
Type
Description
array
An array of names of attributes which alias this attribute or
an empty array if no attribute aliases this object.
getEquality(
)
:
string
Description
Gets this attribute's equality string
Return value
Type
Description
string
getIsCollective(
)
:
boolean
Description
Gets whether this attribute is collective.
Return value
Type
Description
boolean
Returns true if this attribute is collective and false otherwise.
getIsNoUserModification(
)
:
boolean
Description
Gets whether this attribute is not modifiable by users.
Return value
Type
Description
boolean
Returns true if this attribute is not modifiable by users.
getIsSingleValue(
)
:
boolean
Description
Gets whether this attribute is single-valued. If this attribute only supports single values, true
is returned. If this attribute supports multiple values, false is returned.
Return value
Type
Description
boolean
Returns true if this attribute is single-valued or false otherwise.
getMaxLength(
)
:
int
Description
Gets this attribute's the maximum length. If no maximum is defined by the LDAP server, null is returned.
Return value
Type
Description
int
The maximum length (in characters) of this attribute or null if no maximum is specified.
getOrdering(
)
:
string
Description
Gets this attribute's ordering specification.
Return value
Type
Description
string
getRequiredByObjectClasses(
)
:
array
Description
Gets the list of "required by" objectClasses, that is the list of objectClasses
which provide must have attribute.
Return value
Type
Description
array
An array of names of objectclasses (strings) which provide this attribute
getSubstr(
)
:
string
Description
Gets this attribute's substring matching specification
Return value
Type
Description
string
getSupAttribute(
)
:
string
Description
Gets this attribute's parent attribute (if any). If this attribute does not
inherit from another attribute, null is returned.
Return value
Type
Description
string
getSyntaxOID(
)
:
string
Description
Gets this attribute's syntax OID. Differs from getSyntaxString() in that this
function only returns the actual OID with any length specification removed. Ie, if the syntax string is "1.2.3.4{16}", this function only retruns
"1.2.3.4".
Return value
Type
Description
string
The syntax OID string.
getSyntaxString(
)
:
string
Description
Gets this attribute's raw syntax string (ie: "1.2.3.4{16}").
Return value
Type
Description
string
The raw syntax string
getType(
)
:
string
Description
Gets this attribute's type
Return value
Type
Description
string
The attribute's type.
getUsage(
)
:
string
Description
Gets this attribute's usage string as defined by the LDAP server
Return value
Type
Description
string
getUsedInObjectClasses(
)
:
array
Description
Gets the list of "used in" objectClasses, that is the list of objectClasses
which provide this attribute.
Return value
Type
Description
array
An array of names of objectclasses (strings) which provide this attribute
isAliasFor(
string
$attr_name,
)
:
boolean
Description
Returns whether the specified attribute is an alias for this one (based on this attribute's alias list).
Arguments
Name
Type
Description
Default
$attr_name
string
The name of the attribute to check.
Return value
Type
Description
boolean
True if the specified attribute is an alias for this one, or false otherwise.
Represents an LDAP Syntax All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.
Represents an LDAP MatchingRule All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.
Represents an LDAP schema matchingRuleUse entry All schema items have at least two things in common: An OID
and a description. This class provides an implementation for
these two data.