| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect3 id="zend.ldap.api.reference.zend-ldap-node-schema">
- <title>Zend_Ldap_Node_Schema</title>
- <para>The following methods are available on all vendor-specific subclasses.</para>
- <para>
- <code>Zend_Ldap_Node_Schema</code> includes the magic property accessors
- <code>__get()</code> and <code>__isset()</code> to access the attributes by their
- name. They proxy to <code>Zend_Ldap_Node_Schema::getAttribute()</code> and
- <code>Zend_Ldap_Node_Schema::existsAttribute()</code> respectively.
- <code>__set()</code> and <code>__unset()</code> are also implemented, but they throw
- a <code>BadMethodCallException</code> as modifications are not allowed on RootDSE
- nodes. Furthermore the class implements <code>ArrayAccess</code> for
- array-style-access to the attributes. <code>offsetSet()</code> and
- <code>offsetUnset()</code> also throw a <code>BadMethodCallException</code> due to
- obvious reasons.
- </para>
- <table id="zend.ldap.api.reference.zend-ldap-node-schema.table">
- <title>Zend_Ldap_Node_Schema API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>Zend_Ldap_Dn getDn()</code></entry>
- <entry>
- Gets the DN of the current node as a <classname>Zend_Ldap_Dn</classname>.
- </entry>
- </row>
- <row>
- <entry><code>string getDnString(string $caseFold)</code></entry>
- <entry>Gets the DN of the current node as a string.</entry>
- </row>
- <row>
- <entry><code>array getDnArray(string $caseFold)</code></entry>
- <entry>Gets the DN of the current node as an array.</entry>
- </row>
- <row>
- <entry><code>string getRdnString(string $caseFold)</code></entry>
- <entry>Gets the <acronym>RDN</acronym> of the current node as a string.</entry>
- </row>
- <row>
- <entry><code>array getRdnArray(string $caseFold)</code></entry>
- <entry>Gets the <acronym>RDN</acronym> of the current node as an array.</entry>
- </row>
- <row>
- <entry><code>array getObjectClass()</code></entry>
- <entry>Returns the objectClass of the node.</entry>
- </row>
- <row>
- <entry><code>string toString()</code></entry>
- <entry>
- Returns the DN of the current node - proxies to
- <code>Zend_Ldap_Dn::getDnString()</code>.
- </entry>
- </row>
- <row>
- <entry><code>string __toString()</code></entry>
- <entry>
- Casts to string representation - proxies to
- <code>Zend_Ldap_Dn::toString()</code>.
- </entry>
- </row>
- <row>
- <entry><code>array toArray(boolean $includeSystemAttributes)</code></entry>
- <entry>
- Returns an array representation of the current node. If
- <code>$includeSystemAttributes</code> is <constant>FALSE</constant>
- (defaults to <constant>TRUE</constant>), the system specific attributes are
- stripped from the array. Unlike
- <code>Zend_Ldap_Node_Schema::getAttributes()</code>, the resulting
- array contains the DN with key <code>'dn'</code>.
- </entry>
- </row>
- <row>
- <entry><code>string toJson(boolean $includeSystemAttributes)</code></entry>
- <entry>
- Returns a <acronym>JSON</acronym> representation of the current node using
- <code>Zend_Ldap_Node_Schema::toArray()</code>.
- </entry>
- </row>
- <row>
- <entry><code>array getData(boolean $includeSystemAttributes)</code></entry>
- <entry>
- Returns the node's attributes. The array contains all
- attributes in its internal format (no conversion).
- </entry>
- </row>
- <row>
- <entry>
- <code>boolean existsAttribute(string $name, boolean $emptyExists)</code>
- </entry>
- <entry>
- Checks whether a given attribute exists. If
- <code>$emptyExists</code> is <constant>FALSE</constant>, empty attributes
- (containing only array()) are treated as non-existent returning
- <constant>FALSE</constant>. If <code>$emptyExists</code> is
- <constant>TRUE</constant>, empty attributes are treated as existent
- returning <constant>TRUE</constant>. In this case the method returns
- <constant>FALSE</constant> only if the attribute name is missing in the
- key-collection.
- </entry>
- </row>
- <row>
- <entry>
- <code>boolean attributeHasValue(string $name, mixed|array $value)</code>
- </entry>
- <entry>
- Checks if the given value(s) exist in the attribute. The
- method returns <constant>TRUE</constant> only if all values in
- <code>$value</code> are present in the attribute. Comparison is
- done strictly (respecting the data type).
- </entry>
- </row>
- <row>
- <entry><code>integer count()</code></entry>
- <entry>
- Returns the number of attributes in the node. Implements Countable.
- </entry>
- </row>
- <row>
- <entry>
- <code>mixed getAttribute(string $name, integer|null $index)</code>
- </entry>
- <entry>
- Gets a <acronym>LDAP</acronym> attribute. Data conversion is applied using
- <code>Zend_Ldap_Attribute::getAttribute()</code>.
- </entry>
- </row>
- <row>
- <entry>
- <code>array getAttributes(boolean $includeSystemAttributes)</code>
- </entry>
- <entry>
- Gets all attributes of node. If
- <code>$includeSystemAttributes</code> is <constant>FALSE</constant>
- (defaults to <constant>TRUE</constant>) the system specific attributes are
- stripped from the array.
- </entry>
- </row>
- <row>
- <entry>
- <code>array|integer getDateTimeAttribute(string $name,
- integer|null $index)</code>
- </entry>
- <entry>
- Gets a <acronym>LDAP</acronym> date/time attribute. Data conversion is
- applied using <code>Zend_Ldap_Attribute::getDateTimeAttribute()</code>.
- </entry>
- </row>
- <row>
- <entry>
- <code>Zend_Ldap_Node_Schema reload(Zend_Ldap $ldap)</code>
- </entry>
- <entry>
- Reloads the current node's attributes from the given <acronym>LDAP</acronym>
- server.
- </entry>
- </row>
- <row>
- <entry>
- <emphasis><code>Zend_Ldap_Node_Schema create(Zend_Ldap
- $ldap)</code> </emphasis>
- </entry>
- <entry>Factory method to create the Schema node.</entry>
- </row>
- <row>
- <entry><code>array getAttributeTypes()</code></entry>
- <entry>Gets the attribute types as an array of <code/>.</entry>
- </row>
- <row>
- <entry><code>array getObjectClasses()</code></entry>
- <entry>
- Gets the object classes as an array of
- <code>Zend_Ldap_Node_Schema_ObjectClass_Interface</code>.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="zend.ldap.api.reference.zend-ldap-node-schema.attributetype-interface.table">
- <title>Zend_Ldap_Node_Schema_AttributeType_Interface API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>string getName()</code></entry>
- <entry>Gets the attribute name.</entry>
- </row>
- <row>
- <entry><code>string getOid()</code></entry>
- <entry>Gets the attribute <acronym>OID</acronym>.</entry>
- </row>
- <row>
- <entry><code>string getSyntax()</code></entry>
- <entry>Gets the attribute syntax.</entry>
- </row>
- <row>
- <entry><code>int|null getMaxLength()</code></entry>
- <entry>Gets the attribute maximum length.</entry>
- </row>
- <row>
- <entry><code>boolean isSingleValued()</code></entry>
- <entry>Returns if the attribute is single-valued.</entry>
- </row>
- <row>
- <entry><code>string getDescription()</code></entry>
- <entry>Gets the attribute description</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="zend.ldap.api.reference.zend-ldap-node-schema.objectclass-interface.table">
- <title>Zend_Ldap_Node_Schema_ObjectClass_Interface API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>string getName()</code></entry>
- <entry>Returns the objectClass name.</entry>
- </row>
- <row>
- <entry><code>string getOid()</code></entry>
- <entry>Returns the objectClass <acronym>OID</acronym>.</entry>
- </row>
- <row>
- <entry><code>array getMustContain()</code></entry>
- <entry>Returns the attributes that this objectClass must contain.</entry>
- </row>
- <row>
- <entry><code>array getMayContain()</code></entry>
- <entry>Returns the attributes that this objectClass may contain.</entry>
- </row>
- <row>
- <entry><code>string getDescription()</code></entry>
- <entry>Returns the attribute description</entry>
- </row>
- <row>
- <entry><code>integer getType()</code></entry>
- <entry>
- Returns the objectClass type. The method returns one of the following
- values:
- <variablelist>
- <varlistentry>
- <term><code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_UNKNOWN</code></term>
- <listitem><para>for unknown class types</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_STRUCTURAL</code></term>
- <listitem><para>for structural classes</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_ABSTRACT</code></term>
- <listitem><para>for abstract classes</para></listitem>
- </varlistentry>
- <varlistentry>
- <term><code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_AUXILIARY</code></term>
- <listitem><para>for auxiliary classes</para></listitem>
- </varlistentry>
- </variablelist>
- </entry>
- </row>
- <row>
- <entry><code>array getParentClasses()</code></entry>
- <entry>
- Returns the parent objectClasses of this class. This
- includes structural, abstract and auxiliary objectClasses.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>
- Classes representing attribute types and object classes extend
- <code>Zend_Ldap_Node_Schema_Item</code> which provides some core methods to access
- arbitrary attributes on the underlying <acronym>LDAP</acronym> node.
- <code>Zend_Ldap_Node_Schema_Item</code> includes the magic property accessors
- <code>__get()</code> and <code>__isset()</code> to access the attributes by their
- name. Furthermore the class implements <code>ArrayAccess</code> for
- array-style-access to the attributes. <code>offsetSet()</code> and
- <code>offsetUnset()</code> throw a <code>BadMethodCallException</code> as
- modifications are not allowed on schema information nodes.
- </para>
- <table id="zend.ldap.api.reference.zend-ldap-node-schema.schema-item.table">
- <title>Zend_Ldap_Node_Schema_Item API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>array getData()</code></entry>
- <entry>Gets all the underlying data from the schema information node.</entry>
- </row>
- <row>
- <entry><code>integer count()</code></entry>
- <entry>
- Returns the number of attributes in this schema information
- node. Implements Countable.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <sect4 id="zend.ldap.api.reference.zend-ldap-node-schema.openldap">
- <title>OpenLDAP</title>
- <para>
- Additionally the common methods above apply to instances of
- <code>Zend_Ldap_Node_Schema_OpenLDAP</code>.
- </para>
- <table id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.table">
- <title>Zend_Ldap_Node_Schema_OpenLDAP API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>array getLdapSyntaxes()</code></entry>
- <entry>Gets the <acronym>LDAP</acronym> syntaxes.</entry>
- </row>
- <row>
- <entry><code>array getMatchingRules()</code></entry>
- <entry>Gets the matching rules.</entry>
- </row>
- <row>
- <entry><code>array getMatchingRuleUse()</code></entry>
- <entry>Gets the matching rule use.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table
- id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.attributetype-interface.table">
- <title>Zend_Ldap_Node_Schema_AttributeType_OpenLDAP API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <code>Zend_Ldap_Node_Schema_AttributeType_OpenLdap|null
- getParent()</code>
- </entry>
- <entry>
- Returns the parent attribute type in the inheritance tree if one exists.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table
- id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.objectclass-interface.table">
- <title>Zend_Ldap_Node_Schema_ObjectClass_OpenLDAP API</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Method</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><code>array getParents()</code></entry>
- <entry>
- Returns the parent object classes in the inheritance
- tree if one exists. The returned array is an array of
- <code>Zend_Ldap_Node_Schema_ObjectClass_OpenLdap</code>.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect4>
- <sect4 id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory">
- <title>ActiveDirectory</title>
- <note>
- <title>Schema browsing on ActiveDirectory servers</title>
- <para>
- 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 <emphasis>not</emphasis> available for Microsoft ActiveDirectory
- servers.
- </para>
- </note>
- <para>
- <code>Zend_Ldap_Node_Schema_ActiveDirectory</code> does not provide any
- additional methods.
- </para>
- <table
- id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.attributetype-interface.table">
- <title>Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory API</title>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry>
- <code>Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory</code>
- does not provide any additional methods.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table
- id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.objectclass-interface.table">
- <title>Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory API</title>
- <tgroup cols="1">
- <tbody>
- <row>
- <entry>
- <code>Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory</code>
- does not provide any additional methods.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect4>
- </sect3>
|