Represents an LDAP AttributeType

package | lib

### Methods

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

    AttributeType($raw_ldap_attr_string)

### Parameters

#### $raw_ldap_attr_string

## Adds an attribute name to the alias array.

    addAlias(string $new_alias_name)

### Parameters

#### $new_alias_name

`string`

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

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

    addRequiredByObjectClass(string $object_class_name)

### Parameters

#### $object_class_name

`string`

The name of the objectClass to add.

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

    addUsedInObjectClass(string $object_class_name)

### Parameters

#### $object_class_name

`string`

The name of the objectClass to add.

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

    getAliases() : array

### Returns

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

## Gets this attribute's equality string

    getEquality() : string

### Returns

`string`

## Gets whether this attribute is collective.

    getIsCollective() : bool

### Returns

`bool`Returns true if this attribute is collective and false otherwise.

## Gets whether this attribute is not modifiable by users.

    getIsNoUserModification() : bool

### Returns

`bool`Returns true if this attribute is not modifiable by users.

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

    getIsObsolete() : bool

### Returns

`bool`

## Gets whether this attribute is single-valued.

    getIsSingleValue() : bool

If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned.

### Returns

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

## Gets this attribute's the maximum length.

    getMaxLength() : int

If no maximum is defined by the LDAP server, null is returned.

### Returns

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

## Gets this attribute's name

    getName() : string

### Returns

`string`

## Gets this attribute's ordering specification.

    getOrdering() : string

### Returns

`string`

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

    getRequiredByObjectClasses() : array

### Returns

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

## Gets this attribute's substring matching specification

    getSubstr() : string

### Returns

`string`

## Gets this attribute's parent attribute (if any).

    getSupAttribute() : string

If this attribute does not inherit from another attribute, null is returned.

### Returns

`string`

## Gets this attribute's syntax OID.

    getSyntaxOID() : string

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

### Returns

`string`The syntax OID string.

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

    getSyntaxString() : string

### Returns

`string`The raw syntax string

## Gets this attribute's type

    getType() : string

### Returns

`string`The attribute's type.

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

    getUsage() : string

### Returns

`string`

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

    getUsedInObjectClasses() : array

### Returns

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

## Initialize the class' member variables

    initVars()

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

    isAliasFor(string $attr_name) : bool

### Parameters

#### $attr_name

`string`

The name of the attribute to check.

### Returns

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

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

    removeAlias(string $remove_alias_name) : bool

### Parameters

#### $remove_alias_name

`string`

The name of the attribute to remove.

### Returns

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

## Sets this attribute's list of aliases.

    setAliases(array $new_aliases)

### Parameters

#### $new_aliases

`array`

The array of alias names (strings)

## Sets whether this attribute is single-valued.

    setIsSingleValue(bool $is_single_value)

### Parameters

#### $is_single_value

`bool`

## Sets this attriute's name.

    setName(string $new_name)

### Parameters

#### $new_name

`string`

The new name to give this attribute.

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

    setSupAttribute(string $new_sup_attr)

### Parameters

#### $new_sup_attr

`string`

The name of the new parent (SUP) attribute

## Sets this attribute's type.

    setType(string $new_type)

### Parameters

#### $new_type

`string`

The new type.

### Properties

## An array of alias attribute names, strings

    $aliases

## The equality rule used

    $equality

## boolean: is collective?

    $is_collective

## boolean: can use modify?

    $is_no_user_modification

## string: the description

    $is_obsolete

## boolean: is single valued only?

    $is_single_value

## The max number of characters this attribute can be

    $max_length

## The name of this attributeType

    $name

## The ordering of the attributeType

    $ordering

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

    $required_by_object_classes

## Boolean: supports substring matching?

    $sub_str

## The attribute from which this attribute inherits (if any)

    $sup_attribute

## The full syntax string, ie 1.2.3.4{16}

    $syntax

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

    $type

## The usage string set by the LDAP schema

    $usage

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

    $used_in_object_classes

Represents an LDAP AttributeType

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 AttributeType object from a raw LDAP AttributeType string.

    __construct($attr)

### Parameters

#### $attr

## Adds an attribute name to the alias array.

    addAlias(string $alias)

### Parameters

#### $alias

`string`

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

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

    addRequiredByObjectClass(string $name)

### Parameters

#### $name

`string`

The name of the objectClass to add.

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

    addUsedInObjectClass(string $name)

### Parameters

#### $name

`string`

The name of the objectClass to add.

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

    getAliases() : array

### Returns

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

## getDescription()

    getDescription()

Inherited

inherited_from | \SchemaItem::getDescription()

## Gets this attribute's equality string

    getEquality() : string

### Returns

`string`

## Gets whether this attribute is collective.

    getIsCollective() : boolean

### Returns

`boolean`Returns true if this attribute is collective and false otherwise.

## Gets whether this attribute is not modifiable by users.

    getIsNoUserModification() : boolean

### Returns

`boolean`Returns true if this attribute is not modifiable by users.

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

    getIsObsolete()

Inherited

inherited_from | \SchemaItem::getIsObsolete()

## Gets whether this attribute is single-valued.

    getIsSingleValue() : boolean

If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned.

### Returns

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

## Gets this attribute's the maximum length.

    getMaxLength() : int

If no maximum is defined by the LDAP server, null is returned.

### Returns

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

## 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

`string`The name

## getOID()

    getOID()

Inherited

inherited_from | \SchemaItem::getOID()

## Gets this attribute's ordering specification.

    getOrdering() : string

### Returns

`string`

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

    getRequiredByObjectClasses() : array

### Returns

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

## Gets this attribute's substring matching specification

    getSubstr() : string

### Returns

`string`

## Gets this attribute's parent attribute (if any).

    getSupAttribute() : string

If this attribute does not inherit from another attribute, null is returned.

### Returns

`string`

## Gets this attribute's syntax OID.

    getSyntaxOID() : string

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

### Returns

`string`The syntax OID string.

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

    getSyntaxString() : string

### Returns

`string`The raw syntax string

## Gets this attribute's type

    getType() : string

### Returns

`string`The attribute's type.

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

    getUsage() : string

### Returns

`string`

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

    getUsedInObjectClasses() : array

### Returns

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

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

    isAliasFor(string $attr_name) : boolean

### Parameters

#### $attr_name

`string`

The name of the attribute to check.

### Returns

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

## isForceMay()

    isForceMay()

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

    removeAlias(string $remove_alias_name) : boolean

### Parameters

#### $remove_alias_name

`string`

The name of the attribute to remove.

### Returns

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

## Sets this attribute's list of aliases.

    setAliases(array $aliases)

### Parameters

#### $aliases

`array`

The array of alias names (strings)

## setDescription()

    setDescription($desc)

Inherited

inherited_from | \SchemaItem::setDescription()

### Parameters

#### $desc

## This function will mark this attribute as a forced MAY attribute

    setForceMay()

## Sets whether this attribute is single-valued.

    setIsSingleValue(boolean $is)

### Parameters

#### $is

`boolean`

## Sets this attriute's name.

    setName(string $name)

### Parameters

#### $name

`string`

The new name to give this attribute.

## setOID()

    setOID($oid)

Inherited

inherited_from | \SchemaItem::setOID()

### Parameters

#### $oid

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

    setSupAttribute(string $attr)

### Parameters

#### $attr

`string`

The name of the new parent (SUP) attribute

## Sets this attribute's type.

    setType(string $type)

### Parameters

#### $type

`string`

The new type.

### Properties

## $description

    $description

Inherited

inherited_from | \SchemaItem::$$description

## $name

    $name

Inherited

inherited_from | \SchemaItem::$$name

## $aliases

    $aliases

## $equality

    $equality

## $forced_as_may

    $forced_as_may

## $is_collective

    $is_collective

## $is_no_user_modification

    $is_no_user_modification

## $is_obsolete

    $is_obsolete

Inherited

inherited_from | \SchemaItem::$$is_obsolete

## $is_single_value

    $is_single_value

## $max_length

    $max_length

## $oid

    $oid

Inherited

inherited_from | \SchemaItem::$$oid

## $ordering

    $ordering

## $required_by_object_classes

    $required_by_object_classes

## $sub_str

    $sub_str

## $sup_attribute

    $sup_attribute

## $syntax

    $syntax

## $syntax_oid

    $syntax_oid

## $type

    $type

## $usage

    $usage

## $used_in_object_classes

    $used_in_object_classes