LDAP Account Manager

ObjectClass extends SchemaItem
in package

Represents an LDAP objectClass

Table of Contents

$children_objectclasses  : array<string|int, mixed>
$description  : string|null
$is_obsolete  : bool
$may_attrs  : array<string|int, string>
$must_attrs  : array<string|int, string>
$name  : string|null
$oid  : string|null
$sup_classes  : array<string|int, string>
$type  : string|null
__construct()  : mixed
Creates a new ObjectClass object given a raw LDAP objectClass string.
addChildObjectClass()  : bool
Adds an objectClass to the list of objectClasses that inherit from this objectClass.
getChildObjectClasses()  : array<string|int, string>
Returns the array of objectClass names which inherit from this objectClass.
getDescription()  : string|null
getIsObsolete()  : bool
Gets whether this objectClass is flagged as obsolete by the LDAP server.
getMayAttrNames()  : array<string|int, string>
Gets an array of attribute names (strings) that entries of this ObjectClass must define.
getMayAttrs()  : array<string|int, AttributeType>
Gets an array of AttributeType objects that entries of this ObjectClass may define.
getMustAttrNames()  : array<string|int, string>
Gets an array of attribute names (strings) that entries of this ObjectClass must define.
getMustAttrs()  : array<string|int, AttributeType>
Gets an array of AttributeType objects that entries of this ObjectClass must define.
getName()  : string
Gets the name of this objectClass (ie, "inetOrgPerson")
getOID()  : string|null
getSupClasses()  : array<string|int, string>
Gets the objectClass names from which this objectClass inherits.
getType()  : string
Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY.
initVars()  : void
Initialize the class' member variables
setDescription()  : void
setOID()  : void

Properties

$children_objectclasses

protected array<string|int, mixed> $children_objectclasses = []

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

$description

protected string|null $description

The description of this schema item.

$is_obsolete

protected bool $is_obsolete

boolean value indicating whether this objectClass is obsolete

$may_attrs

protected array<string|int, string> $may_attrs

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

$must_attrs

protected array<string|int, string> $must_attrs

arrays of attribute names that this objectClass requires

$name

protected string|null $name

This objectClass' name, ie "inetOrgPerson"

$oid

protected string|null $oid

The OID of this schema item.

$sup_classes

protected array<string|int, string> $sup_classes

array of objectClass names from which this objectClass inherits

$type

protected string|null $type

one of STRUCTURAL, ABSTRACT, or AUXILIARY

Methods

__construct()

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

public __construct(string $raw_ldap_schema_string) : mixed
Parameters
$raw_ldap_schema_string : string

schema string

Return values
mixed

addChildObjectClass()

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

public addChildObjectClass(string $object_class_name) : bool
Parameters
$object_class_name : string

The name of the objectClass to add

Return values
bool

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

getChildObjectClasses()

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

public getChildObjectClasses() : array<string|int, string>
Return values
array<string|int, string>

Names of objectClasses which inherit from this objectClass.

getDescription()

public getDescription() : string|null
Return values
string|null

description

getIsObsolete()

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

public getIsObsolete() : bool
Return values
bool

obsolete

getMayAttrNames()

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

public getMayAttrNames([array<string|int, ObjectClass$oclasses = null ]) : array<string|int, string>

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

Parameters
$oclasses : array<string|int, ObjectClass> = null

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.

Tags
see
getMustAttrs
see
getMayAttrs
see
getMustAttrNames
Return values
array<string|int, string>

The array of allowed attribute names (strings).

getMayAttrs()

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

public getMayAttrs([array<string|int, ObjectClass$oclasses = NULL ]) : array<string|int, AttributeType>

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

Parameters
$oclasses : array<string|int, ObjectClass> = NULL

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.

Tags
see
getMustAttrNames
see
getMustAttrs
see
getMayAttrNames
see
AttributeType
Return values
array<string|int, AttributeType>

attributes

getMustAttrNames()

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

public getMustAttrNames([array<string|int, ObjectClass$oclasses = null ]) : array<string|int, string>

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

Parameters
$oclasses : array<string|int, ObjectClass> = null

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.

Tags
see
getMustAttrs
see
getMayAttrs
see
getMayAttrNames
Return values
array<string|int, string>

The array of allowed attribute names (strings).

getMustAttrs()

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

public getMustAttrs([array<string|int, ObjectClass$oclasses = NULL ]) : array<string|int, AttributeType>

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

Parameters
$oclasses : array<string|int, ObjectClass> = NULL

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.

Tags
see
getMustAttrNames
see
getMayAttrs
see
getMayAttrNames
Return values
array<string|int, AttributeType>

attributes

getName()

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

public getName() : string
Return values
string

The name of the objectClass

getOID()

public getOID() : string|null
Return values
string|null

oid

getSupClasses()

Gets the objectClass names from which this objectClass inherits.

public getSupClasses() : array<string|int, string>
Return values
array<string|int, string>

objectClass names

getType()

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

public getType() : string
Return values
string

type

initVars()

Initialize the class' member variables

public initVars() : void
Return values
void

setDescription()

public setDescription(string|null $new_desc) : void
Parameters
$new_desc : string|null

description

Return values
void

setOID()

public setOID(string|null $new_oid) : void
Parameters
$new_oid : string|null

oid

Return values
void

Search results