AttributeType
extends SchemaItem
in package
Represents an LDAP AttributeType
Table of Contents
- $aliases : mixed
- An array of alias attribute names, strings
- $description : mixed
- The description of this schema item.
- $equality : mixed
- The equality rule used
- $is_collective : mixed
- boolean: is collective?
- $is_no_user_modification : mixed
- boolean: can use modify?
- $is_obsolete : mixed
- string: the description
- $is_single_value : mixed
- boolean: is single valued only?
- $max_length : mixed
- The max number of characters this attribute can be
- $name : mixed
- The name of this attributeType
- $oid : mixed
- The OID of this schema item.
- $ordering : mixed
- The ordering of the attributeType
- $required_by_object_classes : mixed
- A list of object class names that require this attribute type.
- $sub_str : mixed
- Boolean: supports substring matching?
- $sup_attribute : mixed
- The attribute from which this attribute inherits (if any)
- $syntax : mixed
- The full syntax string, ie 1.2.3.4{16}
- $syntax_oid : mixed
- syntax OID
- $type : mixed
- A string description of the syntax type (taken from the LDAPSyntaxes)
- $usage : mixed
- The usage string set by the LDAP schema
- $used_in_object_classes : mixed
- An array of objectClasses which use this attributeType (must be set by caller)
- __construct() : mixed
- Creates a new AttributeType objcet from a raw LDAP AttributeType string.
- addAlias() : mixed
- Adds an attribute name to the alias array.
- addRequiredByObjectClass() : mixed
- 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() : mixed
- 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, mixed>
- Gets the names of attributes that are an alias for this attribute (if any).
- getDescription() : mixed
- 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() : int
- 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() : mixed
- getOrdering() : string
- Gets this attribute's ordering specification.
- getRequiredByObjectClasses() : array<string|int, mixed>
- 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
- 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, mixed>
- Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute.
- initVars() : mixed
- 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() : mixed
- Sets this attribute's list of aliases.
- setDescription() : mixed
- setIsSingleValue() : mixed
- Sets whether this attribute is single-valued.
- setName() : mixed
- Sets this attriute's name.
- setOID() : mixed
- setSupAttribute() : mixed
- Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits).
- setType() : mixed
- Sets this attribute's type.
Properties
$aliases
An array of alias attribute names, strings
public
mixed
$aliases
$description
The description of this schema item.
public
mixed
$description
$equality
The equality rule used
public
mixed
$equality
$is_collective
boolean: is collective?
public
mixed
$is_collective
$is_no_user_modification
boolean: can use modify?
public
mixed
$is_no_user_modification
$is_obsolete
string: the description
public
mixed
$is_obsolete
$is_single_value
boolean: is single valued only?
public
mixed
$is_single_value
$max_length
The max number of characters this attribute can be
public
mixed
$max_length
$name
The name of this attributeType
public
mixed
$name
$oid
The OID of this schema item.
public
mixed
$oid
$ordering
The ordering of the attributeType
public
mixed
$ordering
$required_by_object_classes
A list of object class names that require this attribute type.
public
mixed
$required_by_object_classes
= []
$sub_str
Boolean: supports substring matching?
public
mixed
$sub_str
$sup_attribute
The attribute from which this attribute inherits (if any)
public
mixed
$sup_attribute
$syntax
The full syntax string, ie 1.2.3.4{16}
public
mixed
$syntax
$syntax_oid
syntax OID
public
mixed
$syntax_oid
$type
A string description of the syntax type (taken from the LDAPSyntaxes)
public
mixed
$type
$usage
The usage string set by the LDAP schema
public
mixed
$usage
$used_in_object_classes
An array of objectClasses which use this attributeType (must be set by caller)
public
mixed
$used_in_object_classes
Methods
__construct()
Creates a new AttributeType objcet from a raw LDAP AttributeType string.
public
__construct(mixed $raw_ldap_attr_string) : mixed
Parameters
- $raw_ldap_attr_string : mixed
Return values
mixed —addAlias()
Adds an attribute name to the alias array.
public
addAlias(string $new_alias_name) : mixed
Parameters
- $new_alias_name : string
-
The name of a new attribute to add to this attribute's list of aliases.
Return values
mixed —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) : mixed
Parameters
- $object_class_name : string
-
The name of the objectClass to add.
Return values
mixed —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) : mixed
Parameters
- $object_class_name : string
-
The name of the objectClass to add.
Return values
mixed —getAliases()
Gets the names of attributes that are an alias for this attribute (if any).
public
getAliases() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of names of attributes which alias this attribute or an empty array if no attribute aliases this object.
getDescription()
public
getDescription() : mixed
Return values
mixed —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() : int
Return values
int —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() : mixed
Return values
mixed —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, mixed>
Return values
array<string|int, mixed> —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
Return values
string —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, mixed>
Return values
array<string|int, mixed> —An array of names of objectclasses (strings) which provide this attribute
initVars()
Initialize the class' member variables
public
initVars() : mixed
Return values
mixed —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, mixed> $new_aliases) : mixed
Parameters
- $new_aliases : array<string|int, mixed>
-
The array of alias names (strings)
Return values
mixed —setDescription()
public
setDescription(mixed $new_desc) : mixed
Parameters
- $new_desc : mixed
Return values
mixed —setIsSingleValue()
Sets whether this attribute is single-valued.
public
setIsSingleValue(bool $is_single_value) : mixed
Parameters
- $is_single_value : bool
Return values
mixed —setName()
Sets this attriute's name.
public
setName(string $new_name) : mixed
Parameters
- $new_name : string
-
The new name to give this attribute.
Return values
mixed —setOID()
public
setOID(mixed $new_oid) : mixed
Parameters
- $new_oid : mixed
Return values
mixed —setSupAttribute()
Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits).
public
setSupAttribute(string $new_sup_attr) : mixed
Parameters
- $new_sup_attr : string
-
The name of the new parent (SUP) attribute
Return values
mixed —setType()
Sets this attribute's type.
public
setType(string $new_type) : mixed
Parameters
- $new_type : string
-
The new type.