Ldap/Node/Schema/OpenLdap.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Ldap  
Subpackage
Schema  
Version
$Id: OpenLdap.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Ldap_Node_Schema_OpenLdap

Package: Zend\Ldap\Schema

Zend_Ldap_Node_Schema_OpenLdap provides a simple data-container for the Schema node of an OpenLDAP server.

Parent(s)
\Zend_Ldap_Node_Schema < \Zend_Ldap_Node_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

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

Properties

Propertyprotectedarray $_attributeTypes = null

The attribute Types

Default valuenullDetails
Type
array
Propertyprotectedarray $_currentData =
inherited

Holds the node's current data.

Inherited from: \Zend_Ldap_Node_Abstract::$$_currentData\Zend_Ldap_Node_Schema::$$_currentData
Details
Type
array
Inherited_from
\Zend_Ldap_Node_Abstract::$$_currentData  
Inherited_from
\Zend_Ldap_Node_Schema::$$_currentData  
Propertyprotected\Zend_Ldap_Dn $_dn =
inherited

Holds the node's DN.

Inherited from: \Zend_Ldap_Node_Abstract::$$_dn\Zend_Ldap_Node_Schema::$$_dn
Details
Type
\Zend_Ldap_Dn
Inherited_from
\Zend_Ldap_Node_Abstract::$$_dn  
Inherited_from
\Zend_Ldap_Node_Schema::$$_dn  
Propertyprotectedarray $_ldapSyntaxes = null

The LDAP syntaxes

Default valuenullDetails
Type
array
Propertyprotectedarray $_matchingRuleUse = null

The matching rule use

Default valuenullDetails
Type
array
Propertyprotectedarray $_matchingRules = null

The matching rules

Default valuenullDetails
Type
array
Propertyprotectedarray $_objectClasses = null

The object classes

Default valuenullDetails
Type
array
Propertyprotected$_systemAttributes = array('createtimestamp', 'creatorsname', 'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname', 'modifytimestamp', 'structuralobjectclass', 'subschemasubentry', 'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated')
Default valuearray('createtimestamp', 'creatorsname', 'entrycsn', 'entrydn', 'entryuuid', 'hassubordinates', 'modifiersname', 'modifytimestamp', 'structuralobjectclass', 'subschemasubentry', 'distinguishedname', 'instancetype', 'name', 'objectcategory', 'objectguid', 'usnchanged', 'usncreated', 'whenchanged', 'whencreated')Details
Type
n/a
Inherited_from
\Zend_Ldap_Node_Abstract::$$_systemAttributes  
Inherited_from
\Zend_Ldap_Node_Schema::$$_systemAttributes  

Methods

methodprotected__construct(\Zend_Ldap_Dn $dn, array $data, \Zend_Ldap $ldap) : void
inherited

Constructor.

Inherited from: \Zend_Ldap_Node_Schema::__construct()

Constructor is protected to enforce the use of factory methods.

Parameters
Name Type Description
$dn \Zend_Ldap_Dn
$data array
$ldap \Zend_Ldap
methodpublic__get(string $name) : array
inherited

Gets a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::__get()\Zend_Ldap_Node_Schema::__get()

This is an offline method.

Parameters
Name Type Description
$name string
Returns
Type Description
array
Throws
Exception Description
\Zend_Ldap_Exception
methodpublic__isset(string $name) : boolean
inherited

Checks whether a given attribute exists.

Inherited from: \Zend_Ldap_Node_Abstract::__isset()\Zend_Ldap_Node_Schema::__isset()

Empty attributes will be treated as non-existent.

Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublic__set(string $name, mixed $value) : null
inherited

Sets a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::__set()\Zend_Ldap_Node_Schema::__set()

This is an offline method.

Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
null
Throws
Exception Description
\BadMethodCallException
methodpublic__toString() : string
inherited

Cast to string representation {@see toString()}

Inherited from: \Zend_Ldap_Node_Abstract::__toString()\Zend_Ldap_Node_Schema::__toString()
Returns
Type Description
string
methodpublic__unset(string $name) : null
inherited

Deletes a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::__unset()\Zend_Ldap_Node_Schema::__unset()

This method deletes the attribute.

This is an offline method.

Parameters
Name Type Description
$name string
Returns
Type Description
null
Throws
Exception Description
\BadMethodCallException
methodprotected_ensureNameAttribute(array $data) : void

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

Parameters
Name Type Description
$data array
methodprotected_getDn() : \Zend_Ldap_Dn
inherited

Gets the DN of the current node as a Zend_Ldap_Dn.

Inherited from: \Zend_Ldap_Node_Abstract::_getDn()\Zend_Ldap_Node_Schema::_getDn()

This is an offline method.

Returns
Type Description
\Zend_Ldap_Dn
methodprotected_loadAttributeTypes() : void

Loads the attribute Types

methodprotected_loadData(array $data, boolean $fromDataSource) : void
Parameters
Name Type Description
$data array
$fromDataSource boolean
Throws
Exception Description
\Zend_Ldap_Exception
methodprotected_loadLdapSyntaxes() : void

Loads the LDAP syntaxes

methodprotected_loadMatchingRuleUse() : void

Loads the matching rule use

methodprotected_loadMatchingRules() : void

Loads the matching rules

methodprotected_loadObjectClasses() : void

Loads the object classes

methodprotected_parseAttributeType(string $value) : array

Parses an attributeType value

Parameters
Name Type Description
$value string
Returns
Type Description
array
methodprotected_parseLdapSchemaSyntax(array $data, array $tokens) : void

Parse the given tokens into a data structure

Parameters
Name Type Description
$data array
$tokens array
methodprotected_parseLdapSyntax(string $value) : array

Parses an ldapSyntaxes value

Parameters
Name Type Description
$value string
Returns
Type Description
array
methodprotected_parseMatchingRule(string $value) : array

Parses an matchingRules value

Parameters
Name Type Description
$value string
Returns
Type Description
array
methodprotected_parseMatchingRuleUse(string $value) : array

Parses an matchingRuleUse value

Parameters
Name Type Description
$value string
Returns
Type Description
array
methodprotected_parseObjectClass(string $value) : array

Parses an objectClasses value

Parameters
Name Type Description
$value string
Returns
Type Description
array
methodprotected_parseSchema(\Zend_Ldap_Dn $dn, \Zend_Ldap $ldap) : \Zend_Ldap_Node_Schema

Parses the schema

Parameters
Name Type Description
$dn \Zend_Ldap_Dn
$ldap \Zend_Ldap
Returns
Type Description
\Zend_Ldap_Node_Schema Provides a fluid interface
methodprotected_resolveInheritance(\Zend_Ldap_Node_Schema_Item $node, array $repository) : void

Resolves inheritance in objectClasses and attributes

Parameters
Name Type Description
$node \Zend_Ldap_Node_Schema_Item
$repository array
methodprotected_tokenizeString(string $value) : array

Tokenizes the given value into an array

Parameters
Name Type Description
$value string
Returns
Type Description
array tokens
methodpublicattributeHasValue(string $attribName, mixed | array $value) : boolean
inherited

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

Inherited from: \Zend_Ldap_Node_Abstract::attributeHasValue()\Zend_Ldap_Node_Schema::attributeHasValue()
Parameters
Name Type Description
$attribName string
$value mixed | array
Returns
Type Description
boolean
methodpubliccount() : int
inherited

Returns the number of attributes in node.

Inherited from: \Zend_Ldap_Node_Abstract::count()\Zend_Ldap_Node_Schema::count()

Implements Countable

Returns
Type Description
int
methodpubliccreate(\Zend_Ldap $ldap) : \Zend_Ldap_Node_Schema
staticinherited

Factory method to create the Schema node.

Inherited from: \Zend_Ldap_Node_Schema::create()
Parameters
Name Type Description
$ldap \Zend_Ldap
Returns
Type Description
\Zend_Ldap_Node_Schema
Throws
Exception Description
\Zend_Ldap_Exception
methodpublicexistsAttribute(string $name, boolean $emptyExists = false) : boolean
inherited

Checks whether a given attribute exists.

Inherited from: \Zend_Ldap_Node_Abstract::existsAttribute()\Zend_Ldap_Node_Schema::existsAttribute()

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 Type Description
$name string
$emptyExists boolean
Returns
Type Description
boolean
methodpublicgetAttribute(string $name, integer $index = null) : mixed

This is an offline method.

Parameters
Name Type Description
$name string
$index integer
Returns
Type Description
mixed
Throws
Exception Description
\Zend_Ldap_Exception
methodpublicgetAttributeTypes() : array

Gets the attribute Types

Returns
Type Description
array
methodpublicgetAttributes(boolean $includeSystemAttributes = true) : array
inherited

Gets all attributes of node.

Inherited from: \Zend_Ldap_Node_Abstract::getAttributes()\Zend_Ldap_Node_Schema::getAttributes()

The collection contains all attributes.

This is an offline method.

Parameters
Name Type Description
$includeSystemAttributes boolean
Returns
Type Description
array
methodpublicgetData(boolean $includeSystemAttributes = true) : array
inherited

Gets node attributes.

Inherited from: \Zend_Ldap_Node_Abstract::getData()\Zend_Ldap_Node_Schema::getData()

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

This is an offline method.

Parameters
Name Type Description
$includeSystemAttributes boolean
Returns
Type Description
array
methodpublicgetDateTimeAttribute(string $name, integer $index = null) : array | integer

This is an offline method.

Parameters
Name Type Description
$name string
$index integer
Returns
Type Description
array | integer
Throws
Exception Description
\Zend_Ldap_Exception
methodpublicgetDn() : \Zend_Ldap_Dn
inherited

Gets the DN of the current node as a Zend_Ldap_Dn.

Inherited from: \Zend_Ldap_Node_Abstract::getDn()\Zend_Ldap_Node_Schema::getDn()

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

This is an offline method.

Returns
Type Description
\Zend_Ldap_Dn
methodpublicgetDnArray(string $caseFold = null) : array
inherited

Gets the DN of the current node as an array.

Inherited from: \Zend_Ldap_Node_Abstract::getDnArray()\Zend_Ldap_Node_Schema::getDnArray()

This is an offline method.

Parameters
Name Type Description
$caseFold string
Returns
Type Description
array
methodpublicgetDnString(string $caseFold = null) : string
inherited

Gets the DN of the current node as a string.

Inherited from: \Zend_Ldap_Node_Abstract::getDnString()\Zend_Ldap_Node_Schema::getDnString()

This is an offline method.

Parameters
Name Type Description
$caseFold string
Returns
Type Description
string
methodpublicgetLdapSyntaxes() : array

Gets the LDAP syntaxes

Returns
Type Description
array
methodpublicgetMatchingRuleUse() : array

Gets the matching rule use

Returns
Type Description
array
methodpublicgetMatchingRules() : array

Gets the matching rules

Returns
Type Description
array
methodpublicgetObjectClass() : array
inherited

Gets the objectClass of the node

Inherited from: \Zend_Ldap_Node_Abstract::getObjectClass()\Zend_Ldap_Node_Schema::getObjectClass()
Returns
Type Description
array
methodpublicgetObjectClasses() : array

Gets the object classes

Returns
Type Description
array
methodpublicgetRdnArray(string $caseFold = null) : array
inherited

Gets the RDN of the current node as an array.

Inherited from: \Zend_Ldap_Node_Abstract::getRdnArray()\Zend_Ldap_Node_Schema::getRdnArray()

This is an offline method.

Parameters
Name Type Description
$caseFold string
Returns
Type Description
array
methodpublicgetRdnString(string $caseFold = null) : string
inherited

Gets the RDN of the current node as a string.

Inherited from: \Zend_Ldap_Node_Abstract::getRdnString()\Zend_Ldap_Node_Schema::getRdnString()

This is an offline method.

Parameters
Name Type Description
$caseFold string
Returns
Type Description
string
methodpublicoffsetExists(string $name) : boolean
inherited

Checks whether a given attribute exists.

Inherited from: \Zend_Ldap_Node_Abstract::offsetExists()\Zend_Ldap_Node_Schema::offsetExists()

Implements ArrayAccess.

Empty attributes will be treated as non-existent.

Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicoffsetGet(string $name) : array
inherited

Gets a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::offsetGet()\Zend_Ldap_Node_Schema::offsetGet()

Implements ArrayAccess.

This is an offline method.

Parameters
Name Type Description
$name string
Returns
Type Description
array
Throws
Exception Description
\Zend_Ldap_Exception
methodpublicoffsetSet(string $name, mixed $value) : null
inherited

Sets a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::offsetSet()\Zend_Ldap_Node_Schema::offsetSet()

Implements ArrayAccess.

This is an offline method.

Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
null
Throws
Exception Description
\BadMethodCallException
methodpublicoffsetUnset(string $name) : null
inherited

Deletes a LDAP attribute.

Inherited from: \Zend_Ldap_Node_Abstract::offsetUnset()\Zend_Ldap_Node_Schema::offsetUnset()

Implements ArrayAccess.

This method deletes the attribute.

This is an offline method.

Parameters
Name Type Description
$name string
Returns
Type Description
null
Throws
Exception Description
\BadMethodCallException
methodpublicreload(\Zend_Ldap $ldap = null) : \Zend_Ldap_Node_Abstract
inherited

Reload node attributes from LDAP.

Inherited from: \Zend_Ldap_Node_Abstract::reload()\Zend_Ldap_Node_Schema::reload()

This is an online method.

Parameters
Name Type Description
$ldap \Zend_Ldap
Returns
Type Description
\Zend_Ldap_Node_Abstract Provides a fluid interface
Throws
Exception Description
\Zend_Ldap_Exception
methodpublictoArray(boolean $includeSystemAttributes = true) : array
inherited

Returns an array representation of the current node

Inherited from: \Zend_Ldap_Node_Abstract::toArray()\Zend_Ldap_Node_Schema::toArray()
Parameters
Name Type Description
$includeSystemAttributes boolean
Returns
Type Description
array
methodpublictoJson(boolean $includeSystemAttributes = true) : string
inherited

Returns a JSON representation of the current node

Inherited from: \Zend_Ldap_Node_Abstract::toJson()\Zend_Ldap_Node_Schema::toJson()
Parameters
Name Type Description
$includeSystemAttributes boolean
Returns
Type Description
string
methodpublictoString() : string
inherited

Returns the DN of the current node.

Inherited from: \Zend_Ldap_Node_Abstract::toString()\Zend_Ldap_Node_Schema::toString()

{@see getDnString()}

Returns
Type Description
string
Documentation was generated by phpDocumentor 2.0.0a8.