Collection.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Ldap
  17. * @subpackage Node
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Ldap_Collection
  24. */
  25. require_once 'Zend/Ldap/Collection.php';
  26. /**
  27. * Zend_Ldap_Node_Collection provides a collecion of nodes.
  28. *
  29. * @category Zend
  30. * @package Zend_Ldap
  31. * @subpackage Node
  32. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  33. * @license http://framework.zend.com/license/new-bsd New BSD License
  34. */
  35. class Zend_Ldap_Node_Collection extends Zend_Ldap_Collection
  36. {
  37. /**
  38. * Creates the data structure for the given entry data
  39. *
  40. * @param array $data
  41. * @return Zend_Ldap_Node
  42. */
  43. protected function _createEntry(array $data)
  44. {
  45. /**
  46. * @see Zend_Ldap_Node
  47. */
  48. require_once 'Zend/Ldap/Node.php';
  49. $node = Zend_Ldap_Node::fromArray($data, true);
  50. $node->attachLdap($this->_iterator->getLdap());
  51. return $node;
  52. }
  53. /**
  54. * Return the child key (DN).
  55. * Implements Iterator and RecursiveIterator
  56. *
  57. * @return string
  58. */
  59. public function key()
  60. {
  61. return $this->_iterator->key();
  62. }
  63. }