Package Home

Zend Framework 2 Documentation (Manual)

PHK Home

File: /_sources/modules/zend.ldap.api.ldap.node.schema.txt

Size:33259
Storage flags:no_autoload,compress/gzip (8%)

:orphan:

.. _zend.ldap.api.reference.zend-ldap-node-schema:

Zend\\Ldap\\Node\\Schema
========================

The following methods are available on all vendor-specific subclasses.

*Zend\Ldap\Node\Schema* includes the magic property accessors *__get()* and *__isset()* to access the attributes by
their name. They proxy to *Zend\Ldap\Node\Schema::getAttribute()* and *Zend\Ldap\Node\Schema::existsAttribute()*
respectively. *__set()* and *__unset()* are also implemented, but they throw a *BadMethodCallException* as
modifications are not allowed on RootDSE nodes. Furthermore the class implements *ArrayAccess* for
array-style-access to the attributes. *offsetSet()* and *offsetUnset()* also throw a *BadMethodCallException* due
to obvious reasons.

.. _zend.ldap.api.reference.zend-ldap-node-schema.table:

.. table:: Zend\\Ldap\\Node\\Schema API

   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |Method                                                               |Description                                                                                                                                                                                                                                                                                                                                    |
   +=====================================================================+===============================================================================================================================================================================================================================================================================================================================================+
   |Zend\\Ldap\\Dn getDn()                                               |Gets the DN of the current node as a Zend\\Ldap\\Dn.                                                                                                                                                                                                                                                                                           |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string getDnString(string $caseFold)                                 |Gets the DN of the current node as a string.                                                                                                                                                                                                                                                                                                   |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getDnArray(string $caseFold)                                   |Gets the DN of the current node as an array.                                                                                                                                                                                                                                                                                                   |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string getRdnString(string $caseFold)                                |Gets the RDN of the current node as a string.                                                                                                                                                                                                                                                                                                  |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getRdnArray(string $caseFold)                                  |Gets the RDN of the current node as an array.                                                                                                                                                                                                                                                                                                  |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getObjectClass()                                               |Returns the objectClass of the node.                                                                                                                                                                                                                                                                                                           |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string toString()                                                    |Returns the DN of the current node - proxies to Zend\\Ldap\\Dn::getDnString().                                                                                                                                                                                                                                                                 |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string \__toString()                                                 |Casts to string representation - proxies to Zend\\Ldap\\Dn::toString().                                                                                                                                                                                                                                                                        |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array toArray(boolean $includeSystemAttributes)                      |Returns an array representation of the current node. If $includeSystemAttributes is FALSE (defaults to TRUE), the system specific attributes are stripped from the array. Unlike Zend\\Ldap\\Node\\Schema::getAttributes(), the resulting array contains the DN with key 'dn'.                                                                 |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string toJson(boolean $includeSystemAttributes)                      |Returns a JSON representation of the current node using Zend\\Ldap\\Node\\Schema::toArray().                                                                                                                                                                                                                                                   |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getData(boolean $includeSystemAttributes)                      |Returns the node's attributes. The array contains all attributes in its internal format (no conversion).                                                                                                                                                                                                                                       |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |boolean existsAttribute(string $name, boolean $emptyExists)          |Checks whether a given attribute exists. 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 the method returns FALSE only if the attribute name is missing in the key-collection.|
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |boolean attributeHasValue(string $name, mixed|array $value)          |Checks if the given value(s) exist in the attribute. The method returns TRUE only if all values in $value are present in the attribute. Comparison is done strictly (respecting the data type).                                                                                                                                                |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |integer count()                                                      |Returns the number of attributes in the node. Implements Countable.                                                                                                                                                                                                                                                                            |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |mixed getAttribute(string $name, integer|null $index)                |Gets a LDAP attribute. Data conversion is applied using Zend\\Ldap\\Attribute::getAttribute().                                                                                                                                                                                                                                                 |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getAttributes(boolean $includeSystemAttributes)                |Gets all attributes of node. If $includeSystemAttributes is FALSE (defaults to TRUE) the system specific attributes are stripped from the array.                                                                                                                                                                                               |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array|integer getDateTimeAttribute(string $name, integer|null $index)|Gets a LDAP date/time attribute. Data conversion is applied using Zend\\Ldap\\Attribute::getDateTimeAttribute().                                                                                                                                                                                                                               |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |Zend\\Ldap\\Node\\Schema reload(Zend\\Ldap\\Ldap $ldap)              |Reloads the current node's attributes from the given LDAP server.                                                                                                                                                                                                                                                                              |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |Zend\\Ldap\\Node\\Schema create(Zend\\Ldap\\Ldap $ldap)              |Factory method to create the Schema node.                                                                                                                                                                                                                                                                                                      |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getAttributeTypes()                                            |Gets the attribute types as an array of .                                                                                                                                                                                                                                                                                                      |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getObjectClasses()                                             |Gets the object classes as an array of Zend\\Ldap\\Node\\Schema\\ObjectClass\\Interface.                                                                                                                                                                                                                                                       |
   +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.attributetype-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\AttributeType\\Interface API

   +------------------------+------------------------------------------+
   |Method                  |Description                               |
   +========================+==========================================+
   |string getName()        |Gets the attribute name.                  |
   +------------------------+------------------------------------------+
   |string getOid()         |Gets the attribute OID.                   |
   +------------------------+------------------------------------------+
   |string getSyntax()      |Gets the attribute syntax.                |
   +------------------------+------------------------------------------+
   |int|null getMaxLength() |Gets the attribute maximum length.        |
   +------------------------+------------------------------------------+
   |boolean isSingleValued()|Returns if the attribute is single-valued.|
   +------------------------+------------------------------------------+
   |string getDescription() |Gets the attribute description            |
   +------------------------+------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.objectclass-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\ObjectClass\\Interface API

   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |Method                  |Description                                                                                                                                                                                                                                                                                                                                                                       |
   +========================+==================================================================================================================================================================================================================================================================================================================================================================================+
   |string getName()        |Returns the objectClass name.                                                                                                                                                                                                                                                                                                                                                     |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string getOid()         |Returns the objectClass OID.                                                                                                                                                                                                                                                                                                                                                      |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getMustContain()  |Returns the attributes that this objectClass must contain.                                                                                                                                                                                                                                                                                                                        |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getMayContain()   |Returns the attributes that this objectClass may contain.                                                                                                                                                                                                                                                                                                                         |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |string getDescription() |Returns the attribute description                                                                                                                                                                                                                                                                                                                                                 |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |integer getType()       |Returns the objectClass type. The method returns one of the following values: Zend\\Ldap\\Node\\Schema::OBJECTCLASS_TYPE_UNKNOWNfor unknown class typesZend\\Ldap\\Node\\Schema::OBJECTCLASS_TYPE_STRUCTURALfor structural classesZend\\Ldap\\Node\\Schema::OBJECTCLASS_TYPE_ABSTRACTfor abstract classesZend\\Ldap\\Node\\Schema::OBJECTCLASS_TYPE_AUXILIARYfor auxiliary classes|
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |array getParentClasses()|Returns the parent objectClasses of this class. This includes structural, abstract and auxiliary objectClasses.                                                                                                                                                                                                                                                                   |
   +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Classes representing attribute types and object classes extend *Zend\Ldap\Node\Schema\AbstractItem* which provides
some core methods to access arbitrary attributes on the underlying *LDAP* node.
*Zend\Ldap\Node\Schema\AbstractItem* includes the magic property accessors *__get()* and *__isset()* to access the
attributes by their name. Furthermore the class implements *ArrayAccess* for array-style-access to the attributes.
*offsetSet()* and *offsetUnset()* throw a *BadMethodCallException* as modifications are not allowed on schema
information nodes.

.. _zend.ldap.api.reference.zend-ldap-node-schema.schema-item.table:

.. table:: Zend\\Ldap\\Node\\Schema\\AbstractItem API

   +---------------+---------------------------------------------------------------------------------------+
   |Method         |Description                                                                            |
   +===============+=======================================================================================+
   |array getData()|Gets all the underlying data from the schema information node.                         |
   +---------------+---------------------------------------------------------------------------------------+
   |integer count()|Returns the number of attributes in this schema information node. Implements Countable.|
   +---------------+---------------------------------------------------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.openldap:

OpenLDAP
--------

Additionally the common methods above apply to instances of *Zend\Ldap\Node\Schema\OpenLDAP*.

.. _zend.ldap.api.reference.zend-ldap-node-schema.openldap.table:

.. table:: Zend\\Ldap\\Node\\Schema\\OpenLDAP API

   +--------------------------+---------------------------+
   |Method                    |Description                |
   +==========================+===========================+
   |array getLdapSyntaxes()   |Gets the LDAP syntaxes.    |
   +--------------------------+---------------------------+
   |array getMatchingRules()  |Gets the matching rules.   |
   +--------------------------+---------------------------+
   |array getMatchingRuleUse()|Gets the matching rule use.|
   +--------------------------+---------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.openldap.attributetype-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\AttributeType\\OpenLDAP API

   +------------------------------------------------------------------+------------------------------------------------------------------------+
   |Method                                                            |Description                                                             |
   +==================================================================+========================================================================+
   |Zend\\Ldap\\Node\\Schema\\AttributeType\\OpenLdap|null getParent()|Returns the parent attribute type in the inheritance tree if one exists.|
   +------------------------------------------------------------------+------------------------------------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.openldap.objectclass-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\ObjectClass\\OpenLDAP API

   +------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
   |Method            |Description                                                                                                                                                |
   +==================+===========================================================================================================================================================+
   |array getParents()|Returns the parent object classes in the inheritance tree if one exists. The returned array is an array of Zend\\Ldap\\Node\\Schema\\ObjectClass\\OpenLdap.|
   +------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.activedirectory:

ActiveDirectory
---------------

.. note::

   **Schema browsing on ActiveDirectory servers**

   Due to restrictions on Microsoft ActiveDirectory servers regarding the number of entries returned by generic
   search routines and due to the structure of the ActiveDirectory schema repository, schema browsing is currently
   **not** available for Microsoft ActiveDirectory servers.

*Zend\Ldap\Node\Schema\ActiveDirectory* does not provide any additional methods.

.. _zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.attributetype-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\AttributeType\\ActiveDirectory API

   +-------------------------------------------------------------------------------------------------+
   |Zend\\Ldap\\Node\\Schema\\AttributeType\\ActiveDirectory does not provide any additional methods.|
   +-------------------------------------------------------------------------------------------------+

.. _zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.objectclass-interface.table:

.. table:: Zend\\Ldap\\Node\\Schema\\ObjectClass\\ActiveDirectory API

   +-----------------------------------------------------------------------------------------------+
   |Zend\\Ldap\\Node\\Schema\\ObjectClass\\ActiveDirectory does not provide any additional methods.|
   +-----------------------------------------------------------------------------------------------+



For more information about the PHK package format: http://phk.tekwire.net