HumHub Documentation (unofficial)

OpenLdap extends Schema
in package

Laminas\Ldap\Node\Schema\OpenLDAP provides a simple data-container for the Schema node of an OpenLDAP server.

Table of Contents

Constants

OBJECTCLASS_TYPE_ABSTRACT  = 3
OBJECTCLASS_TYPE_AUXILIARY  = 4
OBJECTCLASS_TYPE_STRUCTURAL  = 1
OBJECTCLASS_TYPE_UNKNOWN  = 0

Properties

$attributeTypes  : array<string|int, mixed>
The attribute Types
$currentData  : array<string|int, mixed>
Holds the node's current data.
$dn  : Dn
Holds the node's DN.
$ldapSyntaxes  : array<string|int, mixed>
The LDAP syntaxes
$matchingRules  : array<string|int, mixed>
The matching rules
$matchingRuleUse  : array<string|int, mixed>
The matching rule use
$objectClasses  : array<string|int, mixed>
The object classes
$systemAttributes  : array<int, non-empty-string>

Methods

__get()  : mixed
Gets a LDAP attribute.
__isset()  : bool
Checks whether a given attribute exists.
__set()  : mixed
Sets a LDAP attribute.
__toString()  : string
Cast to string representation {@see toString()}
__unset()  : mixed
Deletes a LDAP attribute.
attributeHasValue()  : bool
Checks if the given value(s) exist in the attribute
count()  : mixed
create()  : Schema
Factory method to create the Schema node.
existsAttribute()  : bool
Checks whether a given attribute exists.
getAttribute()  : mixed
Gets a LDAP attribute.
getAttributes()  : array<string|int, mixed>
Gets all attributes of node.
getAttributeTypes()  : array<string|int, mixed>
Gets the attribute Types
getData()  : array<string|int, mixed>
Gets node attributes.
getDateTimeAttribute()  : array<string|int, mixed>|int
Gets a LDAP date/time attribute.
getDn()  : Dn
Gets the DN of the current node as a Laminas\Ldap\Dn.
getDnArray()  : array<string|int, mixed>
Gets the DN of the current node as an array.
getDnString()  : string
Gets the DN of the current node as a string.
getLdapSyntaxes()  : array<string|int, mixed>
Gets the LDAP syntaxes
getMatchingRules()  : array<string|int, mixed>
Gets the matching rules
getMatchingRuleUse()  : array<string|int, mixed>
Gets the matching rule use
getObjectClass()  : array<string|int, mixed>
Gets the objectClass of the node
getObjectClasses()  : array<string|int, mixed>
Gets the object classes
getRdnArray()  : array<string|int, mixed>
Gets the RDN of the current node as an array.
getRdnString()  : string
Gets the RDN of the current node as a string.
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
reload()  : AbstractNode
Reload node attributes from LDAP.
toArray()  : array<string|int, mixed>
Returns an array representation of the current node
toJson()  : string
Returns a JSON representation of the current node
toString()  : string
Returns the DN of the current node. {@see getDnString()}
__construct()  : mixed
Constructor is protected to enforce the use of factory methods.
_getDn()  : Dn
Gets the DN of the current node as a Laminas\Ldap\Dn.
ensureNameAttribute()  : mixed
Ensures that a name element is present and that it is single-values.
loadAttributeTypes()  : void
Loads the attribute Types
loadData()  : mixed
loadLdapSyntaxes()  : void
Loads the LDAP syntaxes
loadMatchingRules()  : void
Loads the matching rules
loadMatchingRuleUse()  : void
Loads the matching rule use
loadObjectClasses()  : void
Loads the object classes
parseAttributeType()  : array<string|int, mixed>
Parses an attributeType value
parseLdapSchemaSyntax()  : void
Parse the given tokens into a data structure
parseLdapSyntax()  : array<string|int, mixed>
Parses an ldapSyntaxes value
parseMatchingRule()  : array<string|int, mixed>
Parses a matchingRules value
parseMatchingRuleUse()  : array<string|int, mixed>
Parses a matchingRuleUse value
parseObjectClass()  : array<string|int, mixed>
Parses an objectClasses value
parseSchema()  : OpenLdap
Parses the schema
resolveInheritance()  : mixed
Resolves inheritance in objectClasses and attributes
tokenizeString()  : array<string|int, mixed>
Tokenizes the given value into an array

Constants

OBJECTCLASS_TYPE_ABSTRACT

public mixed OBJECTCLASS_TYPE_ABSTRACT = 3

OBJECTCLASS_TYPE_AUXILIARY

public mixed OBJECTCLASS_TYPE_AUXILIARY = 4

OBJECTCLASS_TYPE_STRUCTURAL

public mixed OBJECTCLASS_TYPE_STRUCTURAL = 1

OBJECTCLASS_TYPE_UNKNOWN

public mixed OBJECTCLASS_TYPE_UNKNOWN = 0

Properties

$attributeTypes

The attribute Types

protected array<string|int, mixed> $attributeTypes

$currentData

Holds the node's current data.

protected array<string|int, mixed> $currentData

$ldapSyntaxes

The LDAP syntaxes

protected array<string|int, mixed> $ldapSyntaxes

$matchingRules

The matching rules

protected array<string|int, mixed> $matchingRules

$matchingRuleUse

The matching rule use

protected array<string|int, mixed> $matchingRuleUse

$objectClasses

The object classes

protected array<string|int, mixed> $objectClasses

$systemAttributes

protected static array<int, non-empty-string> $systemAttributes = ['createtimestamp', 'creatorsname', 'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname', 'modifytimestamp', 'structuralobjectclass', 'subschemasubentry', 'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated']

Methods

__get()

Gets a LDAP attribute.

public __get(string $name) : mixed

This is an offline method.

Parameters
$name : string
Tags
throws
LdapException

__isset()

Checks whether a given attribute exists.

public __isset(string $name) : bool

Empty attributes will be treated as non-existent.

Parameters
$name : string
Return values
bool

__set()

Sets a LDAP attribute.

public __set(string $name, mixed $value) : mixed

This is an offline method.

Parameters
$name : string
$value : mixed
Tags
throws
BadMethodCallException

__toString()

Cast to string representation {@see toString()}

public __toString() : string
Return values
string

__unset()

Deletes a LDAP attribute.

public __unset(string $name) : mixed

This method deletes the attribute.

This is an offline method.

Parameters
$name : string
Tags
throws
BadMethodCallException

attributeHasValue()

Checks if the given value(s) exist in the attribute

public attributeHasValue(string $attribName, mixed|array<string|int, mixed> $value) : bool
Parameters
$attribName : string
$value : mixed|array<string|int, mixed>
Return values
bool

create()

Factory method to create the Schema node.

public static create(Ldap $ldap) : Schema
Parameters
$ldap : Ldap
Return values
Schema

existsAttribute()

Checks whether a given attribute exists.

public existsAttribute(string $name[, bool $emptyExists = false ]) : bool

If $emptyExists is false empty attributes (containing only array()) are treated as non-existent returning false. If $emptyExists is true empty attributes are treated as existent returning true. In this case method returns false only if the attribute name is missing in the key-collection.

Parameters
$name : string
$emptyExists : bool = false
Return values
bool

getAttribute()

Gets a LDAP attribute.

public getAttribute(string $name[, int $index = null ]) : mixed

This is an offline method.

Parameters
$name : string
$index : int = null
Tags
throws
LdapException

getAttributes()

Gets all attributes of node.

public getAttributes([bool $includeSystemAttributes = true ]) : array<string|int, mixed>

The collection contains all attributes.

This is an offline method.

Parameters
$includeSystemAttributes : bool = true
Return values
array<string|int, mixed>

getAttributeTypes()

Gets the attribute Types

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

getData()

Gets node attributes.

public getData([bool $includeSystemAttributes = true ]) : array<string|int, mixed>

The array contains all attributes in its internal format (no conversion).

This is an offline method.

Parameters
$includeSystemAttributes : bool = true
Return values
array<string|int, mixed>

getDateTimeAttribute()

Gets a LDAP date/time attribute.

public getDateTimeAttribute(string $name[, int $index = null ]) : array<string|int, mixed>|int

This is an offline method.

Parameters
$name : string
$index : int = null
Tags
throws
LdapException
Return values
array<string|int, mixed>|int

getDn()

Gets the DN of the current node as a Laminas\Ldap\Dn.

public getDn() : Dn

The method returns a clone of the node's DN to prohibit modification.

This is an offline method.

Return values
Dn

getDnArray()

Gets the DN of the current node as an array.

public getDnArray([string $caseFold = null ]) : array<string|int, mixed>

This is an offline method.

Parameters
$caseFold : string = null
Return values
array<string|int, mixed>

getDnString()

Gets the DN of the current node as a string.

public getDnString([string $caseFold = null ]) : string

This is an offline method.

Parameters
$caseFold : string = null
Return values
string

getLdapSyntaxes()

Gets the LDAP syntaxes

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

getMatchingRules()

Gets the matching rules

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

getMatchingRuleUse()

Gets the matching rule use

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

getObjectClass()

Gets the objectClass of the node

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

getObjectClasses()

Gets the object classes

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

getRdnArray()

Gets the RDN of the current node as an array.

public getRdnArray([string $caseFold = null ]) : array<string|int, mixed>

This is an offline method.

Parameters
$caseFold : string = null
Return values
array<string|int, mixed>

getRdnString()

Gets the RDN of the current node as a string.

public getRdnString([string $caseFold = null ]) : string

This is an offline method.

Parameters
$caseFold : string = null
Return values
string

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
inheritDoc

Checks whether a given attribute exists.

Empty attributes will be treated as non-existent.

Attributes
#[ReturnTypeWillChange]

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Tags
inheritDoc

Deletes a LDAP attribute.

This method deletes the attribute.

This is an offline method.

psalm-return

never

throws
BadMethodCallException
Attributes
#[ReturnTypeWillChange]

reload()

Reload node attributes from LDAP.

public reload([Ldap|null $ldap = null ]) : AbstractNode

This is an online method.

Parameters
$ldap : Ldap|null = null
Return values
AbstractNode

Provides a fluid interface

toArray()

Returns an array representation of the current node

public toArray([bool $includeSystemAttributes = true ]) : array<string|int, mixed>
Parameters
$includeSystemAttributes : bool = true
Return values
array<string|int, mixed>

toJson()

Returns a JSON representation of the current node

public toJson([bool $includeSystemAttributes = true ]) : string
Parameters
$includeSystemAttributes : bool = true
Return values
string

toString()

Returns the DN of the current node. {@see getDnString()}

public toString() : string
Return values
string

__construct()

Constructor is protected to enforce the use of factory methods.

protected __construct(Dn $dn, array<string|int, mixed> $data, Ldap $ldap) : mixed
Parameters
$dn : Dn
$data : array<string|int, mixed>
$ldap : Ldap

_getDn()

Gets the DN of the current node as a Laminas\Ldap\Dn.

protected _getDn() : Dn

This is an offline method.

Return values
Dn

ensureNameAttribute()

Ensures that a name element is present and that it is single-values.

protected ensureNameAttribute(array<string|int, mixed> &$data) : mixed
Parameters
$data : array<string|int, mixed>

loadAttributeTypes()

Loads the attribute Types

protected loadAttributeTypes() : void

loadData()

protected loadData(array<string|int, mixed> $data, bool $fromDataSource) : mixed
Parameters
$data : array<string|int, mixed>
$fromDataSource : bool

loadLdapSyntaxes()

Loads the LDAP syntaxes

protected loadLdapSyntaxes() : void

loadMatchingRules()

Loads the matching rules

protected loadMatchingRules() : void

loadMatchingRuleUse()

Loads the matching rule use

protected loadMatchingRuleUse() : void

loadObjectClasses()

Loads the object classes

protected loadObjectClasses() : void

parseAttributeType()

Parses an attributeType value

protected parseAttributeType(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

parseLdapSchemaSyntax()

Parse the given tokens into a data structure

protected parseLdapSchemaSyntax(array<string|int, mixed> &$data, array<string|int, mixed> $tokens) : void
Parameters
$data : array<string|int, mixed>
$tokens : array<string|int, mixed>

parseLdapSyntax()

Parses an ldapSyntaxes value

protected parseLdapSyntax(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

parseMatchingRule()

Parses a matchingRules value

protected parseMatchingRule(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

parseMatchingRuleUse()

Parses a matchingRuleUse value

protected parseMatchingRuleUse(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

parseObjectClass()

Parses an objectClasses value

protected parseObjectClass(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

resolveInheritance()

Resolves inheritance in objectClasses and attributes

protected resolveInheritance(AbstractItem $node, array<string|int, mixed> $repository) : mixed
Parameters
$node : AbstractItem
$repository : array<string|int, mixed>

tokenizeString()

Tokenizes the given value into an array

protected tokenizeString(string $value) : array<string|int, mixed>
Parameters
$value : string
Return values
array<string|int, mixed>

tokens


        
On this page

Search results