Zend_Ldap-API-Ldap-Node.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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">
  5. <title>Zend_Ldap_Node</title>
  6. <para>
  7. <classname>Zend_Ldap_Node</classname> includes the magic propery accessors
  8. <methodname>__set()</methodname>, <methodname>__get()</methodname>,
  9. <methodname>__unset()</methodname> and <methodname>__isset()</methodname> to access the
  10. attributes by their name. They proxy to
  11. <methodname>Zend_Ldap_Node::setAttribute()</methodname>,
  12. <methodname>Zend_Ldap_Node::getAttribute()</methodname>,
  13. <methodname>Zend_Ldap_Node::deleteAttribute()</methodname> and
  14. <methodname>Zend_Ldap_Node::existsAttribute()</methodname> respectively. Furthermore the
  15. class implements <code>ArrayAccess</code> for array-style-access to the attributes.
  16. <classname>Zend_Ldap_Node</classname> also implements <code>Iterator</code> and
  17. <code>RecursiveIterato</code> to allow for recursive tree-traversal.
  18. </para>
  19. <table id="zend.ldap.api.reference.zend-ldap-node.table">
  20. <title>Zend_Ldap_Node API</title>
  21. <tgroup cols="2">
  22. <thead>
  23. <row>
  24. <entry>Method</entry>
  25. <entry>Description</entry>
  26. </row>
  27. </thead>
  28. <tbody>
  29. <row>
  30. <entry><code>Zend_Ldap getLdap()</code></entry>
  31. <entry>
  32. Returns the current <acronym>LDAP</acronym> connection. Throws
  33. <classname>Zend_Ldap_Exception</classname> if current node is in detached
  34. mode (not connected to a <classname>Zend_Ldap</classname> instance).
  35. </entry>
  36. </row>
  37. <row>
  38. <entry>
  39. <code>Zend_Ldap_Node attachLdap(Zend_Ldap
  40. $ldap)</code>
  41. </entry>
  42. <entry>
  43. Attach the current node to the <varname>$ldap</varname>
  44. <classname>Zend_Ldap</classname> instance. Throws
  45. <classname>Zend_Ldap_Exception</classname> if <varname>$ldap</varname> is
  46. not responsible for the current node (node is not a child of the
  47. <varname>$ldap</varname> base DN).
  48. </entry>
  49. </row>
  50. <row>
  51. <entry><code>Zend_Ldap_Node detachLdap()</code></entry>
  52. <entry>Detach node from <acronym>LDAP</acronym> connection.</entry>
  53. </row>
  54. <row>
  55. <entry><code>boolean isAttached()</code></entry>
  56. <entry>
  57. Checks if the current node is attached to a <acronym>LDAP</acronym>
  58. connection.
  59. </entry>
  60. </row>
  61. <row>
  62. <entry>
  63. <emphasis><code>Zend_Ldap_Node
  64. create(string|array|Zend_Ldap_Dn $dn, array $objectClass)</code>
  65. </emphasis>
  66. </entry>
  67. <entry>
  68. Factory method to create a new detached
  69. <classname>Zend_Ldap_Node</classname> for a given DN. Creates a new
  70. <classname>Zend_Ldap_Node</classname> with the DN <varname>$dn</varname> and
  71. the object-classes <varname>$objectClass</varname>.
  72. </entry>
  73. </row>
  74. <row>
  75. <entry>
  76. <emphasis><code>Zend_Ldap_Node
  77. fromLdap(string|array|Zend_Ldap_Dn $dn, Zend_Ldap $ldap)</code>
  78. </emphasis>
  79. </entry>
  80. <entry>
  81. Factory method to create an attached
  82. <classname>Zend_Ldap_Node</classname> for a given DN. Loads an existing
  83. <classname>Zend_Ldap_Node</classname> with the DN <varname>$dn</varname>
  84. from the <acronym>LDAP</acronym> connection <varname>$ldap</varname>.
  85. </entry>
  86. </row>
  87. <row>
  88. <entry>
  89. <emphasis><code>Zend_Ldap_Node fromArray((array $data,
  90. boolean $fromDataSource)</code> </emphasis>
  91. </entry>
  92. <entry>
  93. Factory method to create a detached
  94. <classname>Zend_Ldap_Node</classname> from array data
  95. <varname>$data</varname>. if <varname>$fromDataSource</varname> is
  96. <constant>TRUE</constant> (<constant>FALSE</constant> by default), the data is treated as
  97. beeing present in a <acronym>LDAP</acronym> tree.
  98. </entry>
  99. </row>
  100. <row>
  101. <entry><code>boolean isNew()</code></entry>
  102. <entry>
  103. Tells if the node is consiedered as new (not present on the
  104. server). Please note, that this doesn't tell if the node is really
  105. present on the server. Use <methodname>Zend_Ldap_Node::exists()</methodname>
  106. to see if a node is already there.
  107. </entry>
  108. </row>
  109. <row>
  110. <entry><code>boolean willBeDeleted()</code></entry>
  111. <entry>
  112. Tells if this node is going to be deleted once
  113. <methodname>Zend_Ldap_Node::update()</methodname> is called.
  114. </entry>
  115. </row>
  116. <row>
  117. <entry><code>Zend_Ldap_Node delete()</code></entry>
  118. <entry>
  119. Marks this node as to be deleted. Node will be deleted on
  120. calling <methodname>Zend_Ldap_Node::update()</methodname> if
  121. <methodname>Zend_Ldap_Node::willBeDeleted()</methodname> is true.
  122. </entry>
  123. </row>
  124. <row>
  125. <entry><code>boolean willBeMoved()</code></entry>
  126. <entry>
  127. Tells if this node is going to be moved once
  128. <methodname>Zend_Ldap_Node::update()</methodname> is called.
  129. </entry>
  130. </row>
  131. <row>
  132. <entry><code>Zend_Ldap_Node update(Zend_Ldap $ldap)</code></entry>
  133. <entry>
  134. Sends all pending changes to the <acronym>LDAP</acronym> server. If
  135. <varname>$ldap</varname> is omitted the current <acronym>LDAP</acronym>
  136. connection is used. If the current node is detached from a
  137. <acronym>LDAP</acronym> connection a
  138. <classname>Zend_Ldap_Exception</classname> will be thrown. If
  139. <varname>$ldap</varname> is provided the current node will be attached to
  140. the given <acronym>LDAP</acronym> connection.
  141. </entry>
  142. </row>
  143. <row>
  144. <entry><code>Zend_Ldap_Dn getCurrentDn()</code></entry>
  145. <entry>
  146. Gets the current DN of the current node as a Zend_Ldap_Dn.
  147. This does not reflect possible rename-operations.
  148. </entry>
  149. </row>
  150. <row>
  151. <entry><code>Zend_Ldap_Dn getDn()</code></entry>
  152. <entry>
  153. Gets the original DN of the current node as a Zend_Ldap_Dn.
  154. This reflects possible rename-operations.
  155. </entry>
  156. </row>
  157. <row>
  158. <entry><code>string getDnString(string $caseFold)</code></entry>
  159. <entry>
  160. Gets the original DN of the current node as a string. This
  161. reflects possible rename-operations.
  162. </entry>
  163. </row>
  164. <row>
  165. <entry><code>array getDnArray(string $caseFold)</code></entry>
  166. <entry>
  167. Gets the original DN of the current node as an array. This
  168. reflects possible rename-operations.
  169. </entry>
  170. </row>
  171. <row>
  172. <entry><code>string getRdnString(string $caseFold)</code></entry>
  173. <entry>
  174. Gets the <acronym>RDN</acronym> of the current node as a string. This
  175. reflects possible rename-operations.
  176. </entry>
  177. </row>
  178. <row>
  179. <entry><code>array getRdnArray(string $caseFold)</code></entry>
  180. <entry>
  181. Gets the <acronym>RDN</acronym> of the current node as an array. This
  182. reflects possible rename-operations.
  183. </entry>
  184. </row>
  185. <row>
  186. <entry>
  187. <code>Zend_Ldap_Node setDn(Zend_Ldap_Dn|string|array
  188. $newDn)</code>
  189. </entry>
  190. <entry>
  191. Sets the new DN for this node effectively moving the node
  192. once <methodname>Zend_Ldap_Node::update()</methodname> is called.
  193. </entry>
  194. </row>
  195. <row>
  196. <entry>
  197. <code>Zend_Ldap_Node move(Zend_Ldap_Dn|string|array
  198. $newDn)</code>
  199. </entry>
  200. <entry>
  201. This is an alias for
  202. <methodname>Zend_Ldap_Node::setDn()</methodname>.
  203. </entry>
  204. </row>
  205. <row>
  206. <entry>
  207. <code>Zend_Ldap_Node rename(Zend_Ldap_Dn|string|array
  208. $newDn)</code>
  209. </entry>
  210. <entry>
  211. This is an alias for
  212. <methodname>Zend_Ldap_Node::setDn()</methodname>.
  213. </entry>
  214. </row>
  215. <row>
  216. <entry><code>array getObjectClass()</code></entry>
  217. <entry>Returns the objectClass of the node.</entry>
  218. </row>
  219. <row>
  220. <entry>
  221. <code>Zend_Ldap_Node setObjectClass(array|string
  222. $value)</code>
  223. </entry>
  224. <entry>Sets the objectClass attribute.</entry>
  225. </row>
  226. <row>
  227. <entry>
  228. <code>Zend_Ldap_Node appendObjectClass(array|string
  229. $value)</code>
  230. </entry>
  231. <entry>Appends to the objectClass attribute.</entry>
  232. </row>
  233. <row>
  234. <entry><code>string toLdif(array $options)</code></entry>
  235. <entry>
  236. Returns a <acronym>LDIF</acronym> representation of the current node.
  237. <varname>$options</varname> will be passed to the
  238. <classname>Zend_Ldap_Ldif_Encoder</classname>.
  239. </entry>
  240. </row>
  241. <row>
  242. <entry><code>array getChangedData()</code></entry>
  243. <entry>
  244. Gets changed node data. The array contains all changed
  245. attributes. This format can be used in
  246. <methodname>Zend_Ldap::add()</methodname> and
  247. <methodname>Zend_Ldap::update()</methodname>.
  248. </entry>
  249. </row>
  250. <row>
  251. <entry><code>array getChanges()</code></entry>
  252. <entry>Returns all changes made.</entry>
  253. </row>
  254. <row>
  255. <entry><code>string toString()</code></entry>
  256. <entry>
  257. Returns the DN of the current node - proxies to
  258. <methodname>Zend_Ldap_Dn::getDnString()</methodname>.
  259. </entry>
  260. </row>
  261. <row>
  262. <entry><code>string __toString()</code></entry>
  263. <entry>
  264. Casts to string representation - proxies to
  265. <methodname>Zend_Ldap_Dn::toString()</methodname>.
  266. </entry>
  267. </row>
  268. <row>
  269. <entry>
  270. <code>array toArray(boolean
  271. $includeSystemAttributes)</code>
  272. </entry>
  273. <entry>
  274. Returns an array representation of the current node. If
  275. <varname>$includeSystemAttributes</varname> is <constant>FALSE</constant>
  276. (defaults to <constant>TRUE</constant>) the system specific attributes are
  277. stripped from the array. Unlike
  278. <methodname>Zend_Ldap_Node::getAttributes()</methodname> the resulting array
  279. contains the DN with key <code>'dn'</code>.
  280. </entry>
  281. </row>
  282. <row>
  283. <entry>
  284. <code>string toJson(boolean
  285. $includeSystemAttributes)</code>
  286. </entry>
  287. <entry>
  288. Gibt eine <acronym>JSON</acronym> Repräsentation des aktuellen Nodes zurück
  289. wobei <methodname>Zend_Ldap_Node::toArray()</methodname> verwendet wird.
  290. </entry>
  291. </row>
  292. <row>
  293. <entry>
  294. <code>array getData(boolean
  295. $includeSystemAttributes)</code>
  296. </entry>
  297. <entry>
  298. Gibt die Attribute des Nodes zurück. Das Array enthält alle Attribute in Ihrem
  299. internen Format (keine Konvertierung).
  300. </entry>
  301. </row>
  302. <row>
  303. <entry>
  304. <code>boolean existsAttribute(string $name, boolean
  305. $emptyExists)</code>
  306. </entry>
  307. <entry>
  308. Prüft ob ein angegebenes Attribut existiert. Wenn
  309. <varname>$emptyExists</varname> <constant>FALSE</constant> ist werden leere
  310. Attrbute (welche nur array() enthalten) als nicht-existent betrachtet und es
  311. wird <constant>FALSE</constant> zurückgegeben. Wenn
  312. <varname>$emptyExists</varname> true ist werden leere Attribute als existent
  313. betrachtet und es wird <constant>TRUE</constant> zurückgegeben. In diesem
  314. Fall gibt die Methode nur dann <constant>FALSE</constant> zurck wenn der
  315. Name des Attributs in der Sammlung der Schlüssel fehlt.
  316. </entry>
  317. </row>
  318. <row>
  319. <entry>
  320. <code>boolean attributeHasValue(string $name, mixed|array
  321. $value)</code>
  322. </entry>
  323. <entry>
  324. Prüft ob die angegebenen Werte im Attribut existieren. Die Methode gibt nur
  325. dann <constant>TRUE</constant> zurück wenn alle Werte von
  326. <varname>$value</varname> im Attribut vorhanden sind. Der Vergleich wird
  327. strikt durchgeführt (er respektiert den Datentyp).
  328. </entry>
  329. </row>
  330. <row>
  331. <entry><code>integer count()</code></entry>
  332. <entry>
  333. Gibt die Anzahl der Attribute im Node zurück. Implementiert Countable.
  334. </entry>
  335. </row>
  336. <row>
  337. <entry>
  338. <code>mixed getAttribute(string $name, integer|null
  339. $index)</code>
  340. </entry>
  341. <entry>
  342. Holt ein <acronym>LDAP</acronym> Attribut. Die Datenkonvertierung wird
  343. angewendet durch Verwendung von
  344. <methodname>Zend_Ldap_Attribute::getAttribute()</methodname>.
  345. </entry>
  346. </row>
  347. <row>
  348. <entry>
  349. <code>array getAttributes(boolean
  350. $includeSystemAttributes)</code>
  351. </entry>
  352. <entry>
  353. Holt alle Attribute des Nodes. Wenn
  354. <varname>$includeSystemAttributes</varname> <constant>FALSE</constant> ist
  355. (der Standardwert ist <constant>TRUE</constant>) dann werden die System
  356. spezifischen Attribute vom Array entfernt.
  357. </entry>
  358. </row>
  359. <row>
  360. <entry>
  361. <code>Zend_Ldap_Node setAttribute(string $name, mixed
  362. $value)</code>
  363. </entry>
  364. <entry>
  365. Setzt ein <acronym>LDAP</acronym> Attribut. Die Datenkonvertierung wird
  366. angewendet durch Verwendung von
  367. <methodname>Zend_Ldap_Attribute::setAttribute()</methodname>.
  368. </entry>
  369. </row>
  370. <row>
  371. <entry>
  372. <code>Zend_Ldap_Node appendToAttribute(string $name, mixed
  373. $value)</code>
  374. </entry>
  375. <entry>
  376. Hängt etwas an ein <acronym>LDAP</acronym> Attribut an. Die
  377. Datenkonvertierung wird angewendet durch Verwendung von
  378. <methodname>Zend_Ldap_Attribute::setAttribute()</methodname>.
  379. </entry>
  380. </row>
  381. <row>
  382. <entry>
  383. <code>array|integer getDateTimeAttribute(string $name,
  384. integer|null $index)</code>
  385. </entry>
  386. <entry>
  387. Holt ein <acronym>LDAP</acronym> Date/Time Attribut. Die Datenkonvertierung
  388. wird angewendet durch Verwendung von
  389. <methodname>Zend_Ldap_Attribute::setDateTimeAttribute()</methodname>.
  390. </entry>
  391. </row>
  392. <row>
  393. <entry>
  394. <code>Zend_Ldap_Node setDateTimeAttribute(string $name,
  395. integer|array $value, boolean $utc)</code>
  396. </entry>
  397. <entry>
  398. Setzt ein <acronym>LDAP</acronym> Date/Time Attribut. Die Datenkonvertierung
  399. wird angewendet durch Verwendung von
  400. <methodname>Zend_Ldap_Attribute::setDateTimeAttribute()</methodname>.
  401. </entry>
  402. </row>
  403. <row>
  404. <entry>
  405. <code>Zend_Ldap_Node appendToDateTimeAttribute(string $name,
  406. integer|array $value, boolean $utc)</code>
  407. </entry>
  408. <entry>
  409. Hängt etwas an ein <acronym>LDAP</acronym> Date/Time Attribut an. Die
  410. Datenkonvertierung wird angewendet durch Verwendung von
  411. <methodname>Zend_Ldap_Attribute::setDateTimeAttribute()</methodname>.
  412. </entry>
  413. </row>
  414. <row>
  415. <entry>
  416. <code>Zend_Ldap_Node setPasswordAttribute(string $password,
  417. string $hashType, string $attribName)</code>
  418. </entry>
  419. <entry>
  420. Setzt ein <acronym>LDAP</acronym> Passwort bei
  421. <varname>$attribName</varname> (der Standardwert ist
  422. <code>'userPassword'</code>) auf <varname>$password</varname> mit dem
  423. Hashtyp <varname>$hashType</varname> (der Standardwert ist
  424. <constant>Zend_Ldap_Attribute::PASSWORD_HASH_MD5</constant>).
  425. </entry>
  426. </row>
  427. <row>
  428. <entry>
  429. <code>Zend_Ldap_Node deleteAttribute(string
  430. $name)</code>
  431. </entry>
  432. <entry>Löscht ein <acronym>LDAP</acronym> Attribut.</entry>
  433. </row>
  434. <row>
  435. <entry>
  436. <code>void removeDuplicatesFromAttribute(string
  437. $name)</code>
  438. </entry>
  439. <entry>
  440. Entfernt doppelte Werte von einem <acronym>LDAP</acronym> Attribut.
  441. </entry>
  442. </row>
  443. <row>
  444. <entry>
  445. <code>void removeFromAttribute(string $attribName,
  446. mixed|array $value)</code>
  447. </entry>
  448. <entry>
  449. Entfernt die angegebenen Werte von einem <acronym>LDAP</acronym> Attribut.
  450. </entry>
  451. </row>
  452. <row>
  453. <entry><code>boolean exists(Zend_Ldap $ldap)</code></entry>
  454. <entry>
  455. Prüft ob der aktuelle Node im angegebenen <acronym>LDAP</acronym> Server
  456. existiert (der aktuelle Server wird verwendet wenn
  457. <constant>NULL</constant> übergeben wird).
  458. </entry>
  459. </row>
  460. <row>
  461. <entry><code>Zend_Ldap_Node reload(Zend_Ldap $ldap)</code></entry>
  462. <entry>
  463. Lädt die Attribute des aktuellen Nodes nochmalig vom angegebenen
  464. <acronym>LDAP</acronym> Server (der aktuelle Server wird verwendet wenn
  465. <constant>NULL</constant> übergeben wird).
  466. </entry>
  467. </row>
  468. <row>
  469. <entry>
  470. <code>Zend_Ldap_Node_Collection
  471. searchSubtree(string|Zend_Ldap_Filter_Abstract $filter, integer
  472. $scope, string $sort)</code>
  473. </entry>
  474. <entry>
  475. Sucht den Unterbaum des Nodes mit dem angegebenen <varname>$filter</varname>
  476. und den angegebenen Suchparametern ab. Siehe
  477. <methodname>Zend_Ldap::search()</methodname> für Details über die
  478. Parameter <varname>$scope</varname> und <varname>$sort</varname>.
  479. </entry>
  480. </row>
  481. <row>
  482. <entry>
  483. <code>integer countSubtree(string|Zend_Ldap_Filter_Abstract
  484. $filter, integer $scope)</code>
  485. </entry>
  486. <entry>
  487. Zählt die Elemente des Unterbaums vom Node welche dem angegebenen
  488. <varname>$filter</varname> entsprechen und dem angegebenen Suchbereich.
  489. Siehe <methodname>Zend_Ldap::search()</methodname> für Details über den
  490. <varname>$scope</varname> Parameter.
  491. </entry>
  492. </row>
  493. <row>
  494. <entry><code>integer countChildren()</code></entry>
  495. <entry>Zählt die Kinder des Nodes.</entry>
  496. </row>
  497. <row>
  498. <entry>
  499. <code>Zend_Ldap_Node_Collection
  500. searchChildren(string|Zend_Ldap_Filter_Abstract $filter, string
  501. $sort)</code>
  502. </entry>
  503. <entry>
  504. Sucht nach Kindern des Nodes die dem angegebenen <varname>$filter</varname>
  505. entsprechen. Siehe <methodname>Zend_Ldap::search()</methodname> für Details
  506. über den <varname>$sort</varname> Parameter.
  507. </entry>
  508. </row>
  509. <row>
  510. <entry><code>boolean hasChildren()</code></entry>
  511. <entry>Gibt zurück ob der aktuelle Node Kinder hat.</entry>
  512. </row>
  513. <row>
  514. <entry>
  515. <code>Zend_Ldap_Node_ChildrenIterator
  516. getChildren()</code>
  517. </entry>
  518. <entry>Gibt alle Kinder des aktuellen Nodes zurück.</entry>
  519. </row>
  520. <row>
  521. <entry>
  522. <code>Zend_Ldap_Node getParent(Zend_Ldap
  523. $ldap)</code>
  524. </entry>
  525. <entry>
  526. Gibt den Elternteil des aktuellen Nodes zurück wobei die
  527. <acronym>LDAP</acronym> Verbindung <varname>$ldap</varname> verwendet wird
  528. (verwendet die aktuelle <acronym>LDAP</acronym> Verbindung wenn diese nicht
  529. angegeben wird).
  530. </entry>
  531. </row>
  532. </tbody>
  533. </tgroup>
  534. </table>
  535. </sect3>