LDAP Account Manager

AttributeType extends SchemaItem
in package

Represents an LDAP AttributeType

Table of Contents

$aliases  : array<string|int, string>
$description  : string|null
$equality  : string|null
$is_collective  : bool
$is_no_user_modification  : bool
$is_obsolete  : bool
$is_single_value  : bool|null
$max_length  : string|null
$name  : string|null
$oid  : string|null
$ordering  : string|null
$required_by_object_classes  : array<string|int, string>
$sub_str  : string|null
$sup_attribute  : string|null
$syntax  : string|null
$syntax_oid  : string|null
$type  : string|null
$usage  : string|null
$used_in_object_classes  : array<string|int, string>
__construct()  : mixed
Creates a new AttributeType objcet from a raw LDAP AttributeType string.
addAlias()  : void
Adds an attribute name to the alias array.
addRequiredByObjectClass()  : bool
Adds an objectClass name to this attribute's list of "required by" objectClasses, that is the list of objectClasses which must have this attribute.
addUsedInObjectClass()  : bool
Adds an objectClass name to this attribute's list of "used in" objectClasses, that is the list of objectClasses which provide this attribute.
getAliases()  : array<string|int, string>
Gets the names of attributes that are an alias for this attribute (if any).
getDescription()  : string|null
getEquality()  : string
Gets this attribute's equality string
getIsCollective()  : bool
Gets whether this attribute is collective.
getIsNoUserModification()  : bool
Gets whether this attribute is not modifiable by users.
getIsObsolete()  : bool
Gets whether this attribute has been flagged as obsolete by the LDAP server
getIsSingleValue()  : bool
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.
getMaxLength()  : string|null
Gets this attribute's the maximum length. If no maximum is defined by the LDAP server, null is returned.
getName()  : string
Gets this attribute's name
getOID()  : string|null
getOrdering()  : string
Gets this attribute's ordering specification.
getRequiredByObjectClasses()  : array<string|int, string>
Gets the list of "required by" objectClasses, that is the list of objectClasses which provide must have attribute.
getSubstr()  : string
Gets this attribute's substring matching specification
getSupAttribute()  : string|null
Gets this attribute's parent attribute (if any). If this attribute does not inherit from another attribute, null is returned.
getSyntaxOID()  : string
Gets this attribute's syntax OID. Differs from getSyntaxString() in that this function only returns the actual OID with any length specification removed.
getSyntaxString()  : string
Gets this attribute's raw syntax string (ie: "1.2.3.4{16}").
getType()  : string
Gets this attribute's type
getUsage()  : string
Gets this attribute's usage string as defined by the LDAP server
getUsedInObjectClasses()  : array<string|int, string>
Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute.
initVars()  : void
Initialize the class' member variables
isAliasFor()  : bool
Returns whether the specified attribute is an alias for this one (based on this attribute's alias list).
isBinary()  : bool
Returns if this attribute is binary.
removeAlias()  : bool
Removes an attribute name from this attribute's alias array.
setAliases()  : void
Sets this attribute's list of aliases.
setDescription()  : void
setIsSingleValue()  : void
Sets whether this attribute is single-valued.
setName()  : void
Sets this attriute's name.
setOID()  : void
setSupAttribute()  : void
Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits).
setType()  : void
Sets this attribute's type.

Properties

$aliases

protected array<string|int, string> $aliases

An array of alias attribute names, strings

$description

protected string|null $description

The description of this schema item.

$equality

protected string|null $equality

The equality rule used

$is_collective

protected bool $is_collective

boolean: is collective?

$is_no_user_modification

protected bool $is_no_user_modification

boolean: can use modify?

$is_obsolete

protected bool $is_obsolete

obsolete

$is_single_value

protected bool|null $is_single_value

boolean: is single valued only?

$max_length

protected string|null $max_length

The max number of characters this attribute can be

$name

protected string|null $name

The name of this attributeType

$oid

protected string|null $oid

The OID of this schema item.

$ordering

protected string|null $ordering

The ordering of the attributeType

$required_by_object_classes

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

A list of object class names that require this attribute type.

$sub_str

protected string|null $sub_str

substring matching

$sup_attribute

protected string|null $sup_attribute

The attribute from which this attribute inherits (if any)

$syntax

protected string|null $syntax

The full syntax string, ie 1.2.3.4{16}

$syntax_oid

protected string|null $syntax_oid

syntax OID

$type

protected string|null $type

A string description of the syntax type (taken from the LDAPSyntaxes)

$usage

protected string|null $usage

The usage string set by the LDAP schema

$used_in_object_classes

protected array<string|int, string> $used_in_object_classes

An array of objectClasses which use this attributeType (must be set by caller)

Methods

__construct()

Creates a new AttributeType objcet from a raw LDAP AttributeType string.

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

attribute string

Return values
mixed

addAlias()

Adds an attribute name to the alias array.

public addAlias(string $new_alias_name) : void
Parameters
$new_alias_name : string

The name of a new attribute to add to this attribute's list of aliases.

Return values
void

addRequiredByObjectClass()

Adds an objectClass name to this attribute's list of "required by" objectClasses, that is the list of objectClasses which must have this attribute.

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

The name of the objectClass to add.

Return values
bool

false if already added

addUsedInObjectClass()

Adds an objectClass name to this attribute's list of "used in" objectClasses, that is the list of objectClasses which provide this attribute.

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

The name of the objectClass to add.

Return values
bool

false if already added

getAliases()

Gets the names of attributes that are an alias for this attribute (if any).

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

An array of names of attributes which alias this attribute or an empty array if no attribute aliases this object.

getDescription()

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

description

getEquality()

Gets this attribute's equality string

public getEquality() : string
Return values
string

getIsCollective()

Gets whether this attribute is collective.

public getIsCollective() : bool
Return values
bool

Returns true if this attribute is collective and false otherwise.

getIsNoUserModification()

Gets whether this attribute is not modifiable by users.

public getIsNoUserModification() : bool
Return values
bool

Returns true if this attribute is not modifiable by users.

getIsObsolete()

Gets whether this attribute has been flagged as obsolete by the LDAP server

public getIsObsolete() : bool
Return values
bool

getIsSingleValue()

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.

public getIsSingleValue() : bool
Return values
bool

Returns true if this attribute is single-valued or false otherwise.

getMaxLength()

Gets this attribute's the maximum length. If no maximum is defined by the LDAP server, null is returned.

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

The maximum length (in characters) of this attribute or null if no maximum is specified.

getName()

Gets this attribute's name

public getName() : string
Return values
string

getOID()

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

oid

getOrdering()

Gets this attribute's ordering specification.

public getOrdering() : string
Return values
string

getRequiredByObjectClasses()

Gets the list of "required by" objectClasses, that is the list of objectClasses which provide must have attribute.

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

An array of names of objectclasses (strings) which provide this attribute

getSubstr()

Gets this attribute's substring matching specification

public getSubstr() : string
Return values
string

getSupAttribute()

Gets this attribute's parent attribute (if any). If this attribute does not inherit from another attribute, null is returned.

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

parent attribute name

getSyntaxOID()

Gets this attribute's syntax OID. Differs from getSyntaxString() in that this function only returns the actual OID with any length specification removed.

public getSyntaxOID() : string

Ie, if the syntax string is "1.2.3.4{16}", this function only returns "1.2.3.4".

Return values
string

The syntax OID string.

getSyntaxString()

Gets this attribute's raw syntax string (ie: "1.2.3.4{16}").

public getSyntaxString() : string
Return values
string

The raw syntax string

getType()

Gets this attribute's type

public getType() : string
Return values
string

The attribute's type.

getUsage()

Gets this attribute's usage string as defined by the LDAP server

public getUsage() : string
Return values
string

getUsedInObjectClasses()

Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute.

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

An array of names of objectclasses (strings) which provide this attribute

initVars()

Initialize the class' member variables

public initVars() : void
Return values
void

isAliasFor()

Returns whether the specified attribute is an alias for this one (based on this attribute's alias list).

public isAliasFor(string $attr_name) : bool
Parameters
$attr_name : string

The name of the attribute to check.

Return values
bool

True if the specified attribute is an alias for this one, or false otherwise.

isBinary()

Returns if this attribute is binary.

public isBinary() : bool
Return values
bool

is binary

removeAlias()

Removes an attribute name from this attribute's alias array.

public removeAlias(string $remove_alias_name) : bool
Parameters
$remove_alias_name : string

The name of the attribute to remove.

Return values
bool

true on success or false on failure (ie, if the specified attribute name is not found in this attribute's list of aliases)

setAliases()

Sets this attribute's list of aliases.

public setAliases(array<string|int, string> $new_aliases) : void
Parameters
$new_aliases : array<string|int, string>

The array of alias names (strings)

Return values
void

setDescription()

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

description

Return values
void

setIsSingleValue()

Sets whether this attribute is single-valued.

public setIsSingleValue(bool $is_single_value) : void
Parameters
$is_single_value : bool
Return values
void

setName()

Sets this attriute's name.

public setName(string $new_name) : void
Parameters
$new_name : string

The new name to give this attribute.

Return values
void

setOID()

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

oid

Return values
void

setSupAttribute()

Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits).

public setSupAttribute(string $new_sup_attr) : void
Parameters
$new_sup_attr : string

The name of the new parent (SUP) attribute

Return values
void

setType()

Sets this attribute's type.

public setType(string $new_type) : void
Parameters
$new_type : string

The new type.

Return values
void

Search results