Zend_Ldap-API-Ldap-Node-Schema.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 17230 -->
  3. <!-- Reviewed: no -->
  4. <sect3 id="zend.ldap.api.reference.zend-ldap-node-schema">
  5. <title>Zend_Ldap_Node_Schema</title>
  6. <para>
  7. Die folgenden Methoden sind für alle Hersteller-spezifischen Unterklassen vorhanden.
  8. </para>
  9. <para>
  10. <code>Zend_Ldap_Node_Schema</code> enthält die magischen Methoden <code>__get()</code> und
  11. <code>__isset()</code> um auf die Attribute durch Ihren Namen zugreifen zu können. Die
  12. verweisen auf <code>Zend_Ldap_Node_Schema::getAttribute()</code> und
  13. <code>Zend_Ldap_Node_Schema::existsAttribute()</code>. <code>__set()</code> und
  14. <code>__unset()</code> sind auch implementiert, werfen aber eine
  15. <code>BadMethodCallException</code> da Änderungen auf RootDSE Nodes nicht erlaubt sind.
  16. Weiters implementiert die Klasse <code>ArrayAccess</code> für Array-Artigen Zugriff und
  17. wirft eine <code>BadMethodCallException</code> aus den bekannten Gründen.
  18. </para>
  19. <table id="zend.ldap.api.reference.zend-ldap-node-schema.table">
  20. <title>Zend_Ldap_Node_Schema API</title>
  21. <tgroup cols="2">
  22. <thead>
  23. <row>
  24. <entry>Methode</entry>
  25. <entry>Beschreibung</entry>
  26. </row>
  27. </thead>
  28. <tbody>
  29. <row>
  30. <entry><code>Zend_Ldap_Dn getDn()</code></entry>
  31. <entry>Holt den DN des aktuellen Nodes als Zend_Ldap_Dn.</entry>
  32. </row>
  33. <row>
  34. <entry><code>string getDnString(string $caseFold)</code></entry>
  35. <entry>Holt den DN des aktuellen Nodes als String.</entry>
  36. </row>
  37. <row>
  38. <entry><code>array getDnArray(string $caseFold)</code></entry>
  39. <entry>Holt den DN des aktuellen Nodes als Array.</entry>
  40. </row>
  41. <row>
  42. <entry><code>string getRdnString(string $caseFold)</code></entry>
  43. <entry>Holt den <acronym>RDN</acronym> des aktuellen Nodes als String.</entry>
  44. </row>
  45. <row>
  46. <entry><code>array getRdnArray(string $caseFold)</code></entry>
  47. <entry>Holt den <acronym>RDN</acronym> des aktuellen Nodes als Array.</entry>
  48. </row>
  49. <row>
  50. <entry><code>array getObjectClass()</code></entry>
  51. <entry>Gibt die objectClass des aktuellen Nodes zurück.</entry>
  52. </row>
  53. <row>
  54. <entry><code>string toString()</code></entry>
  55. <entry>
  56. Gibt den DN des aktuellen Nodes zurück - verweist auf
  57. <code>Zend_Ldap_Dn::getDnString()</code>.
  58. </entry>
  59. </row>
  60. <row>
  61. <entry><code>string __toString()</code></entry>
  62. <entry>
  63. Castet auf eine String Darstellung - leitet auf
  64. <code>Zend_Ldap_Dn::toString()</code> weiter.
  65. </entry>
  66. </row>
  67. <row>
  68. <entry>
  69. <code>array toArray(boolean
  70. $includeSystemAttributes)</code>
  71. </entry>
  72. <entry>
  73. Gibt eine Array Darstellung des aktuellen Nodes zurück. Wenn
  74. <code>$includeSystemAttributes</code> <code>false</code> ist (Standardmäßig
  75. ist es <code>true</code>) werden die System spezifischen Attribute vom Array
  76. entfernt. Anders als <code>Zend_Ldap_Node_Schema::getAttributes()</code>
  77. enthält das resultierende Array den DN mit dem Schlüssel <code>'dn'</code>.
  78. </entry>
  79. </row>
  80. <row>
  81. <entry>
  82. <code>string toJson(boolean
  83. $includeSystemAttributes)</code>
  84. </entry>
  85. <entry>
  86. Gibt eine <acronym>JSON</acronym> Darstellung des aktuellen Nodes zurück
  87. indem <code>Zend_Ldap_Node_Schema::toArray()</code> verwendet wird.
  88. </entry>
  89. </row>
  90. <row>
  91. <entry>
  92. <code>array getData(boolean
  93. $includeSystemAttributes)</code>
  94. </entry>
  95. <entry>
  96. Gibt die Attribute des Nodes zurück. Das Array enthält alle Attribute in
  97. Ihrem internen Format (keine Konvertierung).
  98. </entry>
  99. </row>
  100. <row>
  101. <entry>
  102. <code>boolean existsAttribute(string $name, boolean
  103. $emptyExists)</code>
  104. </entry>
  105. <entry>
  106. Prüft ob ein angegebenes Attribut existiert. Wenn <code>$emptyExists</code>
  107. <code>false</code> ist werden leere Attribute (welche nur array() enthalten)
  108. als nicht existierend betrachtet und geben <code>false</code> zurück. Wenn
  109. <code>$emptyExists</code> true ist werden leere Attribute als existent
  110. betrachtet und geben <code>true</code> zurück. In diesem Fall gibt die
  111. Methode nur dann <code>false</code> zurück wenn der Name des
  112. Attributs in der Sammlung der Schlüssel fehlt.
  113. </entry>
  114. </row>
  115. <row>
  116. <entry>
  117. <code>boolean attributeHasValue(string $name, mixed|array
  118. $value)</code>
  119. </entry>
  120. <entry>
  121. Prüft ob angegebene Werte im Attribut existieren. Die Methode gibt nur dann
  122. <code>true</code> zurück wenn alle Werte in <code>$value</code> auch im
  123. Attribut enthalten sind. Der Vergleich wird strikt durchgeführt (er
  124. respektiert den Datentyp).
  125. </entry>
  126. </row>
  127. <row>
  128. <entry><code>integer count()</code></entry>
  129. <entry>
  130. Gibt die Anzahl der Attribute im Node zurück. Implementiert Countable.
  131. </entry>
  132. </row>
  133. <row>
  134. <entry>
  135. <code>mixed getAttribute(string $name, integer|null
  136. $index)</code>
  137. </entry>
  138. <entry>
  139. Holt ein <acronym>LDAP</acronym> Attribut. Datenkonvertierung wird
  140. angewendet indem <code>Zend_Ldap_Attribute::getAttribute()</code> verwendet
  141. wird.
  142. </entry>
  143. </row>
  144. <row>
  145. <entry>
  146. <code>array getAttributes(boolean
  147. $includeSystemAttributes)</code>
  148. </entry>
  149. <entry>
  150. Holt alle Attribute des Nodes. Wenn <code>$includeSystemAttributes</code>
  151. <code>false</code> ist (der Standardwert ist <code>true</code>) werden
  152. System spezifische Attribute vom Array entfernt.
  153. </entry>
  154. </row>
  155. <row>
  156. <entry>
  157. <code>array|integer getDateTimeAttribute(string $name,
  158. integer|null $index)</code>
  159. </entry>
  160. <entry>
  161. Holt ein <acronym>LDAP</acronym> date/time Attribut. Datenkonvertierung wird
  162. angewendet indem <code>Zend_Ldap_Attribute::getDateTimeAttribute()</code>
  163. verwendet wird.
  164. </entry>
  165. </row>
  166. <row>
  167. <entry>
  168. <code>Zend_Ldap_Node_Schema reload(Zend_Ldap
  169. $ldap)</code>
  170. </entry>
  171. <entry>
  172. Lädt die Attribute des aktuellen Nodes neu vom angegebenen
  173. <acronym>LDAP</acronym> Server.
  174. </entry>
  175. </row>
  176. <row>
  177. <entry>
  178. <emphasis><code>Zend_Ldap_Node_Schema create(Zend_Ldap
  179. $ldap)</code> </emphasis>
  180. </entry>
  181. <entry>Factory Methode um den Schema Node zu erstellen.</entry>
  182. </row>
  183. <row>
  184. <entry><code>array getAttributeTypes()</code></entry>
  185. <entry>Holt den Typ des Attributs als Array von <code/>.</entry>
  186. </row>
  187. <row>
  188. <entry><code>array getObjectClasses()</code></entry>
  189. <entry>
  190. Holt das Klassenobjekt als Array von
  191. <code>Zend_Ldap_Node_Schema_ObjectClass_Interface</code>.
  192. </entry>
  193. </row>
  194. </tbody>
  195. </tgroup>
  196. </table>
  197. <table id="zend.ldap.api.reference.zend-ldap-node-schema.attributetype-interface.table">
  198. <title>Zend_Ldap_Node_Schema_AttributeType_Interface API</title>
  199. <tgroup cols="2">
  200. <thead>
  201. <row>
  202. <entry>Methode</entry>
  203. <entry>Beschreibung</entry>
  204. </row>
  205. </thead>
  206. <tbody>
  207. <row>
  208. <entry><code>string getName()</code></entry>
  209. <entry>Holt den Namen des Attributs.</entry>
  210. </row>
  211. <row>
  212. <entry><code>string getOid()</code></entry>
  213. <entry>Holt die <acronym>OID</acronym> des Attributs.</entry>
  214. </row>
  215. <row>
  216. <entry><code>string getSyntax()</code></entry>
  217. <entry>Holt die Syntax des Attributs.</entry>
  218. </row>
  219. <row>
  220. <entry><code>int|null getMaxLength()</code></entry>
  221. <entry>Holt die maximale Länge des Attributs.</entry>
  222. </row>
  223. <row>
  224. <entry><code>boolean isSingleValued()</code></entry>
  225. <entry>Gibt zurück ob das Attribut ein einzelner Wert ist.</entry>
  226. </row>
  227. <row>
  228. <entry><code>string getDescription()</code></entry>
  229. <entry>holt die Beschreibung des Attributs</entry>
  230. </row>
  231. </tbody>
  232. </tgroup>
  233. </table>
  234. <table id="zend.ldap.api.reference.zend-ldap-node-schema.objectclass-interface.table">
  235. <title>Zend_Ldap_Node_Schema_ObjectClass_Interface API</title>
  236. <tgroup cols="2">
  237. <thead>
  238. <row>
  239. <entry>Methode</entry>
  240. <entry>Beschreibung</entry>
  241. </row>
  242. </thead>
  243. <tbody>
  244. <row>
  245. <entry><code>string getName()</code></entry>
  246. <entry>Gibt den Namen von objectClass zurück.</entry>
  247. </row>
  248. <row>
  249. <entry><code>string getOid()</code></entry>
  250. <entry>Gibt das <acronym>OID</acronym> von objectClass zurück.</entry>
  251. </row>
  252. <row>
  253. <entry><code>array getMustContain()</code></entry>
  254. <entry>
  255. Gibt die Attribute zurück welche diese objectClass enthalten muß.
  256. </entry>
  257. </row>
  258. <row>
  259. <entry><code>array getMayContain()</code></entry>
  260. <entry>
  261. Gibt die Attribute zurück welche diese objectClass enthalten kann.
  262. contain.
  263. </entry>
  264. </row>
  265. <row>
  266. <entry><code>string getDescription()</code></entry>
  267. <entry>Gibt die Beschreibung des Attributs zurück</entry>
  268. </row>
  269. <row>
  270. <entry><code>integer getType()</code></entry>
  271. <entry>
  272. Gibt den Typ von objectClass zurück. Diese Methode gibt einen der folgenden
  273. Werte zurück:
  274. <variablelist>
  275. <varlistentry>
  276. <term>
  277. <code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_UNKNOWN</code></term>
  278. <listitem><para>für unbekannte Klassentypen</para></listitem>
  279. </varlistentry>
  280. <varlistentry>
  281. <term>
  282. <code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_STRUCTURAL</code></term>
  283. <listitem><para>für strukturelle Klassen</para></listitem>
  284. </varlistentry>
  285. <varlistentry>
  286. <term>
  287. <code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_ABSTRACT</code></term>
  288. <listitem><para>für abstrakte Klassen</para></listitem>
  289. </varlistentry>
  290. <varlistentry>
  291. <term>
  292. <code>Zend_Ldap_Node_Schema::OBJECTCLASS_TYPE_AUXILIARY</code></term>
  293. <listitem><para>für Hilfsklassen</para></listitem>
  294. </varlistentry>
  295. </variablelist>
  296. </entry>
  297. </row>
  298. <row>
  299. <entry><code>array getParentClasses()</code></entry>
  300. <entry>
  301. Gibt die elterliche objectClass dieser Klasse zurück. Diese enthalten
  302. strukturelle, abstrakte und Hilfsklassen.
  303. </entry>
  304. </row>
  305. </tbody>
  306. </tgroup>
  307. </table>
  308. <para>
  309. Classes representing attribute types and object classes extend
  310. <code>Zend_Ldap_Node_Schema_Item</code> which provides some core methods to access
  311. arbitrary attributes on the underlying <acronym>LDAP</acronym> node.
  312. <code>Zend_Ldap_Node_Schema_Item</code> includes the magic propery accessors
  313. <code>__get()</code> and <code>__isset()</code> to access the attributes by their
  314. name. Furthermore the class implements <code>ArrayAccess</code> for
  315. array-style-access to the attributes. <code>offsetSet()</code> and
  316. <code>offsetUnset()</code> throw a <code>BadMethodCallException</code> as
  317. modifications are not allowed on schema information nodes.
  318. </para>
  319. <table id="zend.ldap.api.reference.zend-ldap-node-schema.schema-item.table">
  320. <title>Zend_Ldap_Node_Schema_Item API</title>
  321. <tgroup cols="2">
  322. <thead>
  323. <row>
  324. <entry>Method</entry>
  325. <entry>Description</entry>
  326. </row>
  327. </thead>
  328. <tbody>
  329. <row>
  330. <entry><code>array getData()</code></entry>
  331. <entry>
  332. Gets all the underlying data from the schema information
  333. node.
  334. </entry>
  335. </row>
  336. <row>
  337. <entry><code>integer count()</code></entry>
  338. <entry>
  339. Returns the number of attributes in this schema information
  340. node. Implements Countable.
  341. </entry>
  342. </row>
  343. </tbody>
  344. </tgroup>
  345. </table>
  346. <sect4 id="zend.ldap.api.reference.zend-ldap-node-schema.openldap">
  347. <title>OpenLDAP</title>
  348. <para>
  349. Additionally the common methods above apply to instances of
  350. <code>Zend_Ldap_Node_Schema_OpenLDAP</code>.
  351. </para>
  352. <table id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.table">
  353. <title>Zend_Ldap_Node_Schema_OpenLDAP API</title>
  354. <tgroup cols="2">
  355. <thead>
  356. <row>
  357. <entry>Method</entry>
  358. <entry>Description</entry>
  359. </row>
  360. </thead>
  361. <tbody>
  362. <row>
  363. <entry><code>array getLdapSyntaxes()</code></entry>
  364. <entry>Gets the <acronym>LDAP</acronym> syntaxes.</entry>
  365. </row>
  366. <row>
  367. <entry><code>array getMatchingRules()</code></entry>
  368. <entry>Gets the matching rules.</entry>
  369. </row>
  370. <row>
  371. <entry><code>array getMatchingRuleUse()</code></entry>
  372. <entry>Gets the matching rule use.</entry>
  373. </row>
  374. </tbody>
  375. </tgroup>
  376. </table>
  377. <table
  378. id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.attributetype-interface.table">
  379. <title>Zend_Ldap_Node_Schema_AttributeType_OpenLDAP API</title>
  380. <tgroup cols="2">
  381. <thead>
  382. <row>
  383. <entry>Method</entry>
  384. <entry>Description</entry>
  385. </row>
  386. </thead>
  387. <tbody>
  388. <row>
  389. <entry>
  390. <code>Zend_Ldap_Node_Schema_AttributeType_OpenLdap|null
  391. getParent()</code>
  392. </entry>
  393. <entry>
  394. Returns the parent attribute type in the inhertitance
  395. tree if one exists.
  396. </entry>
  397. </row>
  398. </tbody>
  399. </tgroup>
  400. </table>
  401. <table
  402. id="zend.ldap.api.reference.zend-ldap-node-schema.openldap.objectclass-interface.table">
  403. <title>Zend_Ldap_Node_Schema_ObjectClass_OpenLDAP API</title>
  404. <tgroup cols="2">
  405. <thead>
  406. <row>
  407. <entry>Method</entry>
  408. <entry>Description</entry>
  409. </row>
  410. </thead>
  411. <tbody>
  412. <row>
  413. <entry><code>array getParents()</code></entry>
  414. <entry>
  415. Returns the parent object classes in the inhertitance
  416. tree if one exists. The returned array is an array of
  417. <code>Zend_Ldap_Node_Schema_ObjectClass_OpenLdap</code>.
  418. </entry>
  419. </row>
  420. </tbody>
  421. </tgroup>
  422. </table>
  423. </sect4>
  424. <sect4 id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory">
  425. <title>ActiveDirectory</title>
  426. <note>
  427. <title>Schema browsing on ActiveDirectory servers</title>
  428. <para>
  429. Due to restrictions on Microsoft ActiveDirectory servers regarding
  430. the number of entries returned by generic search routines and due to the
  431. structure of the ActiveDirectory schema repository, schema browsing is
  432. currently <emphasis>not</emphasis> available for Microsoft ActiveDirectory
  433. servers.
  434. </para>
  435. </note>
  436. <para>
  437. <code>Zend_Ldap_Node_Schema_ActiveDirectory</code> does not provide any
  438. additional methods.
  439. </para>
  440. <table
  441. id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.attributetype-interface.table">
  442. <title>Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory API</title>
  443. <tgroup cols="1">
  444. <tbody>
  445. <row>
  446. <entry>
  447. <code>Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory</code>
  448. does not provide any additional methods.
  449. </entry>
  450. </row>
  451. </tbody>
  452. </tgroup>
  453. </table>
  454. <table
  455. id="zend.ldap.api.reference.zend-ldap-node-schema.activedirectory.objectclass-interface.table">
  456. <title>Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory API</title>
  457. <tgroup cols="1">
  458. <tbody>
  459. <row>
  460. <entry>
  461. <code>Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory</code>
  462. does not provide any additional methods.
  463. </entry>
  464. </row>
  465. </tbody>
  466. </tgroup>
  467. </table>
  468. </sect4>
  469. </sect3>