Zend_Ldap-API-Ldap.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 17230 -->
  3. <!-- Reviewed: no -->
  4. <sect3 id="zend.ldap.api.reference.zend-ldap">
  5. <title>Zend_Ldap</title>
  6. <para>
  7. <classname>Zend_Ldap</classname> is the base interface into a <acronym>LDAP</acronym>
  8. server. It provides connection and binding methods as well as methods to operate on the
  9. <acronym>LDAP</acronym> tree.
  10. </para>
  11. <table id="zend.ldap.api.reference.zend-ldap.table">
  12. <title>Zend_Ldap API</title>
  13. <tgroup cols="2">
  14. <thead>
  15. <row>
  16. <entry>Method</entry>
  17. <entry>Description</entry>
  18. </row>
  19. </thead>
  20. <tbody>
  21. <row>
  22. <entry>
  23. <code>string filterEscape(string $str)</code>
  24. </entry>
  25. <entry>
  26. Escapes a value to be used in a <acronym>LDAP</acronym> filter according to
  27. <acronym>RFC</acronym> 2254. This method is <emphasis>deprecated</emphasis>, please use
  28. <methodname>Zend_Ldap_Filter_Abstract::escapeValue()</methodname>
  29. instead.
  30. </entry>
  31. </row>
  32. <row>
  33. <entry>
  34. <code>boolean explodeDn($dn, array &amp;$keys = null, array &amp;$vals = null)</code>
  35. </entry>
  36. <entry>
  37. Checks if a given DN <varname>$dn</varname> is malformed. If
  38. <varname>$keys</varname> or <varname>$keys</varname> and <varname>$vals</varname> are
  39. given, these arrays will be filled with the appropriate DN keys and
  40. values. This method is <emphasis>deprecated</emphasis>, please use
  41. <methodname>Zend_Ldap_Dn::checkDn()</methodname> instead.
  42. </entry>
  43. </row>
  44. <row>
  45. <entry><code>__construct($options)</code></entry>
  46. <entry>
  47. Constructor. The <varname>$options</varname> parameter is optional
  48. and can be set to an array or a <classname>Zend_Config</classname> instance.
  49. If no options are provided at instantiation, the connection
  50. parameters must be passed to the instance using
  51. <methodname>Zend_Ldap::setOptions()</methodname>. The allowed options are
  52. specified in <link
  53. linkend="zend.ldap.api.configuration.table">Zend_Ldap
  54. Options</link>
  55. </entry>
  56. </row>
  57. <row>
  58. <entry><code>resource getResource()</code></entry>
  59. <entry>Returns the raw <acronym>LDAP</acronym> extension (ext/ldap) resource.</entry>
  60. </row>
  61. <row>
  62. <entry><code>integer getLastErrorCode()</code></entry>
  63. <entry>
  64. Returns the <acronym>LDAP</acronym> error number of the last <acronym>LDAP</acronym>
  65. command.
  66. </entry>
  67. </row>
  68. <row>
  69. <entry>
  70. <code>string getLastError(integer &amp;$errorCode, array &amp;$errorMessages)</code>
  71. </entry>
  72. <entry>
  73. Returns the <acronym>LDAP</acronym> error message of the last <acronym>LDAP</acronym> command. The
  74. optional <varname>$errorCode</varname> parameter is set to the <acronym>LDAP</acronym> error
  75. number when given. The optional <varname>$errorMessages</varname> array
  76. will be filled with the raw error messages when given. The various
  77. <acronym>LDAP</acronym> error retrieval functions can return different things, so they
  78. are all collected if <varname>$errorMessages</varname> is given.
  79. </entry>
  80. </row>
  81. <row>
  82. <entry><code>Zend_Ldap setOptions($options)</code></entry>
  83. <entry>
  84. Sets the <acronym>LDAP</acronym> connection and binding parameters.
  85. <varname>$options</varname> can be an array or an instance of
  86. <classname>Zend_Config</classname>. The allowed options are specified in
  87. <link
  88. linkend="zend.ldap.api.configuration.table">Zend_Ldap Options</link>
  89. </entry>
  90. </row>
  91. <row>
  92. <entry><code>array getOptions()</code></entry>
  93. <entry>
  94. Returns the current connection and binding
  95. parameters.
  96. </entry>
  97. </row>
  98. <row>
  99. <entry><code>string getBaseDn()</code></entry>
  100. <entry>
  101. Returns the base DN this <acronym>LDAP</acronym> connection is bound
  102. to.
  103. </entry>
  104. </row>
  105. <row>
  106. <entry>
  107. <code>string getCanonicalAccountName(string $acctname, integer $form)</code>
  108. </entry>
  109. <entry>
  110. Returns the canonical account name of the given account name
  111. <varname>$acctname</varname>. <varname>$form</varname> specifies the <link
  112. linkend="zend.ldap.using.theory-of-operation.account-name-canonicalization.table">format</link>
  113. into which the account name is canonicalized. See <link
  114. linkend="zend.ldap.introduction.theory-of-operations.account-name-canonicalization">Account Name Canonicalization</link>
  115. for more details.
  116. </entry>
  117. </row>
  118. <row>
  119. <entry><code>Zend_Ldap disconnect()</code></entry>
  120. <entry>
  121. Disconnects the Zend_Ldap instance from the <acronym>LDAP</acronym>
  122. server.
  123. </entry>
  124. </row>
  125. <row>
  126. <entry>
  127. <code>Zend_Ldap connect(string $host, integer $port, boolean $useSsl, boolean $useStartTls)</code>
  128. </entry>
  129. <entry>
  130. Connects the Zend_Ldap instance to the given <acronym>LDAP</acronym> server.
  131. All parameters are optional and will be taken from the <acronym>LDAP</acronym>
  132. connection and binding parameters passed to the instance via the
  133. construtor or via <methodname>Zend_Ldap::setOptions()</methodname> when set to
  134. <constant>NULL</constant>.
  135. </entry>
  136. </row>
  137. <row>
  138. <entry>
  139. <code>Zend_Ldap bind(string $username, string $password)</code>
  140. </entry>
  141. <entry>
  142. Authenticates <varname>$username</varname> with
  143. <varname>$password</varname> at the <acronym>LDAP</acronym> server. If both paramaters are
  144. omitted the binding will be carried out with the credentials given
  145. in the connection and binding parameters. If no credentials are
  146. given in the connection and binding parameters an anonymous bind
  147. will be performed. Note that this requires anonymous binds to be
  148. allowed on the <acronym>LDAP</acronym> server. An empty string <code>''</code> can be
  149. passed as <varname>$password</varname> together with a username if, and
  150. only if, <code>allowEmptyPassword</code> is set to
  151. <constant>TRUE</constant> in the connection and binding parameters.
  152. </entry>
  153. </row>
  154. <row>
  155. <entry>
  156. <code>Zend_Ldap_Collection search(string|Zend_Ldap_Filter_Abstract $filter, string|Zend_Ldap_Dn $basedn, integer $scope, array $attributes, string $sort, string $collectionClass)</code>
  157. </entry>
  158. <entry>
  159. Searches the <acronym>LDAP</acronym> tree with the given <varname>$filter</varname>
  160. and the given search parameters.
  161. <variablelist>
  162. <varlistentry>
  163. <term><code>string|Zend_Ldap_Filter_Abstract
  164. $filter</code></term>
  165. <listitem>
  166. <para>
  167. The filter string to be used in the search, e.g.
  168. <code>(objectClass=posixAccount)</code>.
  169. </para>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry>
  173. <term><code>string|Zend_Ldap_Dn $basedn</code></term>
  174. <listitem>
  175. <para>
  176. The search base for the search. If omitted or
  177. <constant>NULL</constant>, the <code>baseDn</code> from the
  178. connection and binding parameters is used.
  179. </para>
  180. </listitem>
  181. </varlistentry>
  182. <varlistentry>
  183. <term><code>integer $scope</code></term>
  184. <listitem>
  185. <para>
  186. The search scope.
  187. <constant>Zend_Ldap::SEARCH_SCOPE_SUB</constant> searches the
  188. complete subtree including the <varname>$baseDn</varname> node.
  189. <constant>Zend_Ldap::SEARCH_SCOPE_ONE</constant> restricts search
  190. to one level below <varname>$baseDn</varname>.
  191. <constant>Zend_Ldap::SEARCH_SCOPE_BASE</constant> restricts search
  192. to the <varname>$baseDn</varname> itself; this can be used to
  193. efficiently retrieve a single entry by its DN. The default
  194. value is
  195. <constant>Zend_Ldap::SEARCH_SCOPE_SUB</constant>.
  196. </para>
  197. </listitem>
  198. </varlistentry>
  199. <varlistentry>
  200. <term><code>array $attributes</code></term>
  201. <listitem>
  202. <para>
  203. Specifies the attributes contained in the
  204. returned entries. To include all possible attributes (ACL
  205. restrictions can disallow certain attribute to be retrieved
  206. by a given user) pass either an empty array
  207. <methodname>array()</methodname> or <code>array('*')</code> to the
  208. method. On some <acronym>LDAP</acronym> servers you can retrieve special
  209. internal attributes by passing <code>array('*', '+')</code>
  210. to the method.
  211. </para>
  212. </listitem>
  213. </varlistentry>
  214. <varlistentry>
  215. <term><code>string $sort</code></term>
  216. <listitem>
  217. <para>
  218. If given the result collection will be sorted
  219. after the attribute <varname>$sort</varname>. Results can only be
  220. sorted after one single attribute as this parameter uses
  221. the ext/ldap function <methodname>ldap_sort()</methodname>.
  222. </para>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry>
  226. <term><code>string $collectionClass</code></term>
  227. <listitem>
  228. <para>
  229. If given the result will be wrapped in an object
  230. of type <varname>$collectionClass</varname>. By default an object
  231. of type <classname>Zend_Ldap_Collection</classname> will be returned.
  232. The custom class must extend
  233. <classname>Zend_Ldap_Collection</classname> and will be passed a
  234. <classname>Zend_Ldap_Collection_Iterator_Default</classname> on
  235. instantiation.
  236. </para>
  237. </listitem>
  238. </varlistentry>
  239. </variablelist>
  240. </entry>
  241. </row>
  242. <row>
  243. <entry>
  244. <code>integer count(string|Zend_Ldap_Filter_Abstract
  245. $filter, string|Zend_Ldap_Dn $basedn, integer
  246. $scope)</code>
  247. </entry>
  248. <entry>
  249. Counts the elements returned by the given search parameters.
  250. See <methodname>Zend_Ldap::search()</methodname> for a detailed description of
  251. the method parameters.
  252. </entry>
  253. </row>
  254. <row>
  255. <entry>
  256. <code>integer countChildren(string|Zend_Ldap_Dn
  257. $dn)</code>
  258. </entry>
  259. <entry>
  260. Counts the direct descendants (children) of the entry
  261. identified by the given <varname>$dn</varname>.
  262. </entry>
  263. </row>
  264. <row>
  265. <entry><code>boolean exists(string|Zend_Ldap_Dn $dn)</code></entry>
  266. <entry>
  267. Checks whether the entry identified by the given
  268. <varname>$dn</varname> exists.
  269. </entry>
  270. </row>
  271. <row>
  272. <entry>
  273. <code>array searchEntries(string|Zend_Ldap_Filter_Abstract
  274. $filter, string|Zend_Ldap_Dn $basedn, integer $scope, array
  275. $attributes, string $sort)</code>
  276. </entry>
  277. <entry>
  278. Performs a search operation and returns the result as an <acronym>PHP</acronym>
  279. array. This is essentially the same method as
  280. <methodname>Zend_Ldap::search()</methodname> except for the return type. See
  281. <methodname>Zend_Ldap::search()</methodname> for a detailed description of the
  282. method parameters.
  283. </entry>
  284. </row>
  285. <row>
  286. <entry>
  287. <code>array getEntry(string|Zend_Ldap_Dn $dn, array
  288. $attributes, boolean $throwOnNotFound)</code>
  289. </entry>
  290. <entry>
  291. Retrieves the <acronym>LDAP</acronym> entry identified by <varname>$dn</varname> with
  292. the attributes specified in <varname>$attributes</varname>. If
  293. <varname>$attributes</varname> is ommitted, all attributes
  294. (<methodname>array()</methodname>) are included in the result.
  295. <varname>$throwOnNotFound</varname> is <constant>FALSE</constant> by default, so
  296. the method will return <constant>NULL</constant> if the specified entry
  297. cannot be found. If set to <constant>TRUE</constant>, a
  298. <classname>Zend_Ldap_Exception</classname> will be thrown instead.
  299. </entry>
  300. </row>
  301. <row>
  302. <entry>
  303. <emphasis><code>void prepareLdapEntryArray(array
  304. &amp;$entry)</code> </emphasis>
  305. </entry>
  306. <entry>
  307. Bereitet ein Array für die Verwendung in Modifikations Operationen von
  308. <acronym>LDAP</acronym> vor. Diese Methode muß nicht von Endbenutzern
  309. aufgerufen werden da Sie implizit bei jeder Methode die Daten verändert
  310. aufgerufen wird.
  311. </entry>
  312. </row>
  313. <row>
  314. <entry>
  315. <code>Zend_Ldap add(string|Zend_Ldap_Dn $dn, array
  316. $entry)</code>
  317. </entry>
  318. <entry>
  319. Fügt den Eintrag der durch <varname>$dn</varname> mit seinen
  320. <varname>$entry</varname> identifiziert wird im <acronym>LDAP</acronym>
  321. Baum hinzu. Wirft eine <classname>Zend_Ldap_Exception</classname> wenn der
  322. Eintrag nicht hinzugefügt werden konnte.
  323. </entry>
  324. </row>
  325. <row>
  326. <entry>
  327. <code>Zend_Ldap update(string|Zend_Ldap_Dn $dn, array
  328. $entry)</code>
  329. </entry>
  330. <entry>
  331. Aktualisiert den Eintrag der durch <varname>$dn</varname> mit seinen
  332. <varname>$entry</varname> Attributen identifiziert wird im
  333. <acronym>LDAP</acronym> Baum. Wirft eine
  334. <classname>Zend_Ldap_Exception</classname> wenn der Eintrag nicht geändert
  335. werden konnte.
  336. </entry>
  337. </row>
  338. <row>
  339. <entry>
  340. <code>Zend_Ldap save(string|Zend_Ldap_Dn $dn, array
  341. $entry)</code>
  342. </entry>
  343. <entry>
  344. Speichert den Eintrag der durch <varname>$dn</varname> mit seinen
  345. <varname>$entry</varname> Attributen identifiziert wird im
  346. <acronym>LDAP</acronym> Baum. Wirft eine
  347. <classname>Zend_Ldap_Exception</classname> wenn der Eintrag nicht
  348. gespeichert werden konnte. Diese Methode wählt durch eine Suche im
  349. <acronym>LDAP</acronym> Baum ob der Eintrag hinzugefügt oder aktualisiert
  350. wird.
  351. </entry>
  352. </row>
  353. <row>
  354. <entry>
  355. <code>Zend_Ldap delete(string|Zend_Ldap_Dn $dn, boolean
  356. $recursively)</code>
  357. </entry>
  358. <entry>
  359. Löscht den Eintrag der durch <varname>$dn</varname> identifiziert wird vom
  360. <acronym>LDAP</acronym> Baum. Wirft eine
  361. <classname>Zend_Ldap_Exception</classname> Exception wenn der Eintrag nicht
  362. gelöscht werden kann. <varname>$recursively</varname> ist standardmäßig
  363. <constant>FALSE</constant>. Auf <constant>TRUE</constant> gesetzt wird
  364. das Löschen rekursiv durchgeführt und löscht effektiver Weise den kompletten
  365. Unterbaum. Das Löschen wird fehlschlagen wenn
  366. <varname>$recursively</varname> <constant>FALSE</constant> ist und der
  367. <varname>$dn</varname> Eintrag kein Blatteintrag ist.
  368. </entry>
  369. </row>
  370. <row>
  371. <entry>
  372. <code>Zend_Ldap moveToSubtree(string|Zend_Ldap_Dn $from,
  373. string|Zend_Ldap_Dn $to, boolean $recursively, boolean
  374. $alwaysEmulate)</code>
  375. </entry>
  376. <entry>
  377. Verschiebt den Eintrag der von <varname>$from</varname> identifiziert wird
  378. auf einen Ort nach <varname>$to</varname> wobei sein <acronym>RDN</acronym>
  379. unverändert bleibt. <varname>$recursively</varname> spezifiziert ob die
  380. Operation rekursiv ausgeführt wird (standardmäßig
  381. <constant>FALSE</constant>) so dass der Eintrag <varname>$from</varname> und
  382. alle seine Untereinträge verschoben werden. Das Verschieben wird
  383. fehlschlagen wenn <varname>$recursively</varname> <constant>FALSE</constant>
  384. ist und der Eintrag <varname>$from</varname> kein Blatteintrag ist.
  385. <varname>$alwaysEmulate</varname> kontrolliert ob die ext/ldap Funktion
  386. <methodname>ldap_rename()</methodname> verwendet werden soll wenn Sie
  387. vorhanden ist. Das kann nur für Blatteinträge funktionieren und für Server
  388. und für ext/ldap die diese Funktion unterstützen. Auf
  389. <constant>TRUE</constant> gesetzt wird immer eine emulierte Rename Operation
  390. verwendet.
  391. <note>
  392. <para>Alle Verschiebe-Operationen werden ausgeführt indem die
  393. betreffenden Einträge im <acronym>LDAP</acronym> Baum kopiert und
  394. anschließend gelöscht werden. Diese Operationen sind nicht
  395. <emphasis>atomar</emphasis> so dass Fehler wärend der Operation zu einem
  396. <emphasis>inkonsistenten</emphasis> Status am <acronym>LDAP</acronym>
  397. Server führen. Das selbe gilt auch für alle rekursiven Operationen. Auch
  398. diese sind in keiner Weise atomar. Man sollte das immer beachten.
  399. </para>
  400. </note></entry>
  401. </row>
  402. <row>
  403. <entry>
  404. <code>Zend_Ldap move(string|Zend_Ldap_Dn $from,
  405. string|Zend_Ldap_Dn $to, boolean $recursively, boolean
  406. $alwaysEmulate)</code>
  407. </entry>
  408. <entry>
  409. Das ist ein Alias für <methodname>Zend_Ldap::rename()</methodname>.
  410. </entry>
  411. </row>
  412. <row>
  413. <entry>
  414. <code>Zend_Ldap rename(string|Zend_Ldap_Dn $from,
  415. string|Zend_Ldap_Dn $to, boolean $recursively, boolean
  416. $alwaysEmulate)</code>
  417. </entry>
  418. <entry>
  419. Benennt den Eintrag der von <varname>$from</varname> bis
  420. <varname>$to</varname> identifiziert wird um.
  421. <varname>$recursively</varname> spezifiziert ob die Operation rekursiv
  422. durchgeführt werden soll (standardmäßig <constant>FALSE</constant>) so das
  423. der Eintrag <varname>$from</varname> und alle seine Abhängigkeiten
  424. verschoben werden. Das Umbenennen wird fehlschlagen wenn
  425. <varname>$recursively</varname> <constant>FALSE</constant> ist und der
  426. Eintrag <varname>$from</varname> kein Blatteintrag ist.
  427. <varname>$alwaysEmulate</varname> kontrolliert ob die ext/ldap Funktion
  428. <methodname>ldap_rename()</methodname> verwendet werden soll wenn Sie
  429. vorhanden ist. Das kann nur für Blatteinträge und für Server funktionieren
  430. und für ext/ldap welches diese Funktion unterstützt. Wird es auf
  431. <constant>TRUE</constant> gesetzt wird immer die emulierte rename
  432. Operation verwendet.
  433. </entry>
  434. </row>
  435. <row>
  436. <entry>
  437. <code>Zend_Ldap copyToSubtree(string|Zend_Ldap_Dn $from,
  438. string|Zend_Ldap_Dn $to, boolean $recursively)</code>
  439. </entry>
  440. <entry>
  441. Kopiert den Eintrag der von <varname>$from</varname> bis zu einem Ort
  442. unterhalb von <varname>$to</varname> identifiziert wird und lässt dessen
  443. <acronym>RDN</acronym> unverändert. <varname>$recursively</varname>
  444. spezifiziert ob die Operation rekursiv durchgeführt werden soll
  445. (standardmäßig <constant>FALSE</constant>) so das der Eintrag
  446. <varname>$from</varname> und alle seine Abhängigkeiten kopiert werden.
  447. Das Kopieren wird fehlschlagen wenn <varname>$recursively</varname>
  448. <constant>FALSE</constant> ist und der Eintrag <varname>$from</varname>
  449. kein Blatteintrag ist.
  450. </entry>
  451. </row>
  452. <row>
  453. <entry>
  454. <code>Zend_Ldap copy(string|Zend_Ldap_Dn $from,
  455. string|Zend_Ldap_Dn $to, boolean $recursively)</code>
  456. </entry>
  457. <entry>
  458. Kopiert den Eintrag der von <varname>$from</varname> bis
  459. <varname>$to</varname> identifiziert wird. <varname>$recursively</varname>
  460. spezifiziert ob die Operation rekursiv durchgeführt werden soll
  461. (standardmäßig <constant>FALSE</constant>) so das der Eintrag
  462. <varname>$from</varname> und alle seine Abhängigkeiten kopiert werden.
  463. Das Kopieren wird fehlschlagen wenn <varname>$recursively</varname>
  464. <constant>FALSE</constant> ist und der Eintrag <varname>$from</varname>
  465. kein Blatteintrag ist.
  466. </entry>
  467. </row>
  468. <row>
  469. <entry>
  470. <code>Zend_Ldap_Node getNode(string|Zend_Ldap_Dn
  471. $dn)</code>
  472. </entry>
  473. <entry>
  474. Gibt den <varname>$dn</varname> Eintrag zurück der in einem
  475. <classname>Zend_Ldap_Node</classname> gewrappt ist.
  476. </entry>
  477. </row>
  478. <row>
  479. <entry><code>Zend_Ldap_Node getBaseNode()</code></entry>
  480. <entry>
  481. Gibt den Eintrag für den Basis DN <varname>$baseDn</varname> zurück
  482. der in einer <classname>Zend_Ldap_Node</classname> gewrappt ist.
  483. </entry>
  484. </row>
  485. <row>
  486. <entry><code>Zend_Ldap_Node_RootDse getRootDse()</code></entry>
  487. <entry>Gibt den RootDSE für den aktuellen Server zurück.</entry>
  488. </row>
  489. <row>
  490. <entry><code>Zend_Ldap_Node_Schema getSchema()</code></entry>
  491. <entry>
  492. Gibt das <acronym>LDAP</acronym> Schema für den aktuellen Server zurück.
  493. </entry>
  494. </row>
  495. </tbody>
  496. </tgroup>
  497. </table>
  498. <sect4 id="zend.ldap.api.reference.zend-ldap.zend-ldap-collection">
  499. <title>Zend_Ldap_Collection</title>
  500. <para>
  501. <classname>Zend_Ldap_Collection</classname> implementiert <code>Iterator</code> um
  502. das Durchlaufen von Einträgen zu erlauben indem <methodname>foreach()</methodname> und
  503. <code>Countable</code> verwendet werden welche in der Lage sind auf
  504. <methodname>count()</methodname> zu Antworten. Mit seiner geschützten <methodname>_createEntry()</methodname>
  505. Methode bietet es einen einfachen Punkt der Erweiterung für Entwickler welche die
  506. Notwendigkeit für eigene Ergebnisobjekte haben.
  507. </para>
  508. <table id="zend.ldap.api.reference.zend-ldap.zend-ldap-collection.table">
  509. <title>API für Zend_Ldap_Collection</title>
  510. <tgroup cols="2">
  511. <thead>
  512. <row>
  513. <entry>Methode</entry>
  514. <entry>Beschreibung</entry>
  515. </row>
  516. </thead>
  517. <tbody>
  518. <row>
  519. <entry>
  520. <code>__construct(Zend_Ldap_Collection_Iterator_Interface
  521. $iterator)</code>
  522. </entry>
  523. <entry>
  524. Constructor. Der Constructor muß von einem
  525. <classname>Zend_Ldap_Collection_Iterator_Interface</classname> angeboten
  526. werden welches die echte Iteration der Resultate durchführt.
  527. <classname>Zend_Ldap_Collection_Iterator_Default</classname> ist die
  528. standardmäßige Implementation für die Interation durch ext/ldap Ergebnisse.
  529. </entry>
  530. </row>
  531. <row>
  532. <entry><code>boolean close()</code></entry>
  533. <entry>
  534. Schließt den internen Iterator. Wird auch im Destructor aufgerufen.
  535. </entry>
  536. </row>
  537. <row>
  538. <entry><code>array toArray()</code></entry>
  539. <entry>Gibt alle Einträge als Array zurück.</entry>
  540. </row>
  541. <row>
  542. <entry><code>array getFirst()</code></entry>
  543. <entry>
  544. Gibt den ersten Eintrag der Collection zurück, oder <constant>NULL</constant> wenn
  545. die Collection leer ist.
  546. </entry>
  547. </row>
  548. </tbody></tgroup>
  549. </table>
  550. </sect4>
  551. </sect3>