Represents an LDAP objectClass

package lib

 Methods

Creates a new ObjectClass object given a raw LDAP objectClass string.

ObjectClass($raw_ldap_schema_string) 

Parameters

$raw_ldap_schema_string

Adds an objectClass to the list of objectClasses that inherit from this objectClass.

addChildObjectClass(String $object_class_name) : bool

Parameters

$object_class_name

String

The name of the objectClass to add

Returns

boolReturns true on success or false on failure (objectclass already existed for example)

Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass.

addMayAttrs(array $new_may_attrs) 

Parameters

$new_may_attrs

array

An array of attribute names (strings) to add.

Adds the specified array of attributes to this objectClass' list of MUST attributes.

addMustAttrs(array $new_must_attrs) 

The resulting array of must attributes will contain unique members.

Parameters

$new_must_attrs

array

An array of attribute names (strings) to add.

Returns the array of objectClass names which inherit from this objectClass.

getChildObjectClasses() : Array

Returns

ArrayNames of objectClasses which inherit from this objectClass.

Gets whether this objectClass is flagged as obsolete by the LDAP server.

getIsObsolete() 

Gets an array of attribute names (strings) that entries of this ObjectClass must define.

getMayAttrNames(array $oclasses) : array

This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects

see \global\getMustAttrs
see \global\getMayAttrs
see \global\getMustAttrNames

Parameters

$oclasses

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.

Returns

arrayThe array of allowed attribute names (strings).

Gets an array of AttributeType objects that entries of this ObjectClass may define.

getMayAttrs(array $oclasses) : array

This differs from getMayAttrNames in that it returns an array of AttributeType objects

see \global\getMustAttrNames
see \global\getMustAttrs
see \global\getMayAttrNames
see \global\AttributeType

Parameters

$oclasses

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.

Returns

arrayThe array of allowed AttributeType objects.

Gets an array of attribute names (strings) that entries of this ObjectClass must define.

getMustAttrNames(array $oclasses) : array

This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects

see \global\getMustAttrs
see \global\getMayAttrs
see \global\getMayAttrNames

Parameters

$oclasses

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.

Returns

arrayThe array of allowed attribute names (strings).

Gets an array of AttributeType objects that entries of this ObjectClass must define.

getMustAttrs(array $oclasses) : array

This differs from getMustAttrNames in that it returns an array of AttributeType objects

see \global\getMustAttrNames
see \global\getMayAttrs
see \global\getMayAttrNames

Parameters

$oclasses

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.

Returns

arrayThe array of required AttributeType objects.

Gets the name of this objectClass (ie, "inetOrgPerson")

getName() : string

Returns

stringThe name of the objectClass

Gets the objectClass names from which this objectClass inherits.

getSupClasses() : array

Returns

arrayAn array of objectClass names (strings)

Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY.

getType() 

Initialize the class' member variables

initVars() 

 Properties

 

array of objectClasses which inherit from this one (must be set at runtime explicitly by the caller)

$children_objectclasses 

 

boolean value indicating whether this objectClass is obsolete

$is_obsolete 

 

arrays of attribute names that this objectClass allows, but does not require

$may_attrs 

 

arrays of attribute names that this objectClass requires

$must_attrs 

 

This objectClass' name, ie "inetOrgPerson"

$name 

 

array of objectClass names from which this objectClass inherits

$sup_classes 

 

one of STRUCTURAL, ABSTRACT, or AUXILIARY

$type 

Represents an LDAP objectClass

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.

package phpLDAPadmin
subpackage Schema

 Methods

Creates a new ObjectClass object given a raw LDAP objectClass string.

__construct($class, $server) 

Parameters

$class

$server

Adds an objectClass to the list of objectClasses that inherit from this objectClass.

addChildObjectClass(String $name) : boolean

Parameters

$name

String

The name of the objectClass to add

Returns

booleanReturns true on success or false on failure (objectclass already existed for example)

Returns the array of objectClass names which inherit from this objectClass.

getChildObjectClasses() : Array

Returns

ArrayNames of objectClasses which inherit from this objectClass.

getDescription()

getDescription() 
Inherited

inherited_from \SchemaItem::getDescription()

getForceMayAttrs()

getForceMayAttrs() 

Gets whether this objectClass is flagged as obsolete by the LDAP server.

getIsObsolete() 
Inherited

inherited_from \SchemaItem::getIsObsolete()

Gets an array of attribute names (strings) that entries of this ObjectClass must define.

getMayAttrNames(array $parents) : array

This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects

see \global\getMustAttrs
see \global\getMayAttrs
see \global\getMustAttrNames

Parameters

$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.

Returns

arrayThe array of allowed attribute names (strings).

Gets an array of AttributeType objects that entries of this ObjectClass may define.

getMayAttrs(array $parents) : array

This differs from getMayAttrNames in that it returns an array of AttributeType objects

see \global\getMustAttrNames
see \global\getMustAttrs
see \global\getMayAttrNames
see \global\AttributeType

Parameters

$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.

Returns

arrayThe array of allowed AttributeType objects.

Gets an array of attribute names (strings) that entries of this ObjectClass must define.

getMustAttrNames(array $parents) : array

This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects

see \global\getMustAttrs
see \global\getMayAttrs
see \global\getMayAttrNames

Parameters

$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.

Returns

arrayThe array of allowed attribute names (strings).

Gets an array of AttributeType objects that entries of this ObjectClass must define.

getMustAttrs(array $parents) : array

This differs from getMustAttrNames in that it returns an array of AttributeType objects

see \global\getMustAttrNames
see \global\getMayAttrs
see \global\getMayAttrNames

Parameters

$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.

Returns

arrayThe array of required AttributeType objects.

Return the objects name.

getName($lower) : string
Inherited

param boolean $lower Return the name in lower case (default)

inherited_from \SchemaItem::getName()

Parameters

$lower

Returns

stringThe name

getOID()

getOID() 
Inherited

inherited_from \SchemaItem::getOID()

This will return all our parent ObjectClass Objects

getParents() 

Gets the objectClass names from which this objectClass inherits.

getSupClasses() : array

Returns

arrayAn array of objectClass names (strings)

Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY.

getType() 

Determine if an array is listed in the force_may attrs

isForceMay($attr) 

Parameters

$attr

Return if this objectClass is related to $oclass

isRelated(array $oclass) 

Parameters

$oclass

array

ObjectClasses that this attribute may be related to

isStructural()

isStructural() 

setDescription()

setDescription($desc) 
Inherited

inherited_from \SchemaItem::setDescription()

Parameters

$desc

setOID()

setOID($oid) 
Inherited

inherited_from \SchemaItem::setOID()

Parameters

$oid

Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass.

addMayAttrs(array $attr) 

Parameters

$attr

array

An array of attribute names (strings) to add.

Adds the specified array of attributes to this objectClass' list of MUST attributes.

addMustAttrs(array $attr) 

The resulting array of must attributes will contain unique members.

Parameters

$attr

array

An array of attribute names (strings) to add.

Parse an LDAP schema list

parseList($i, $strings, $attrs) 

Parameters

$i

$strings

$attrs

 Properties

 

$description

$description 
Inherited

inherited_from \SchemaItem::$$description
 

$name

$name 
Inherited

inherited_from \SchemaItem::$$name
 

$children_objectclasses

$children_objectclasses 

 

$force_may

$force_may 

 

$hierarchy

$hierarchy 

 

$is_obsolete

$is_obsolete 
Inherited

inherited_from \SchemaItem::$$is_obsolete
 

$may_attrs

$may_attrs 

 

$must_attrs

$must_attrs 

 

$oid

$oid 
Inherited

inherited_from \SchemaItem::$$oid
 

$server_id

$server_id 

 

$sup_classes

$sup_classes 

 

$type

$type