Browse Source

removed unneeded Zend_Ldap_Collection_Iterator_Interface

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18919 44c647ce-9c0f-0410-b52a-842ac1e357ba
sgehrig 16 years ago
parent
commit
80365c252d

+ 14 - 4
library/Zend/Ldap/Collection.php

@@ -32,7 +32,7 @@ class Zend_Ldap_Collection implements Iterator, Countable
     /**
      * Iterator
      *
-     * @var Zend_Ldap_Collection_Iterator_Interface
+     * @var Zend_Ldap_Collection_Iterator_Default
      */
     protected $_iterator = null;
 
@@ -53,9 +53,9 @@ class Zend_Ldap_Collection implements Iterator, Countable
     /**
      * Constructor.
      *
-     * @param Zend_Ldap_Collection_Iterator_Interface $iterator
+     * @param Zend_Ldap_Collection_Iterator_Default $iterator
      */
-    public function __construct(Zend_Ldap_Collection_Iterator_Interface $iterator)
+    public function __construct(Zend_Ldap_Collection_Iterator_Default $iterator)
     {
         $this->_iterator = $iterator;
     }
@@ -96,7 +96,7 @@ class Zend_Ldap_Collection implements Iterator, Countable
      */
     public function getFirst()
     {
-        if ($this->count()>0) {
+        if ($this->count() > 0) {
             $this->rewind();
             return $this->current();
         }
@@ -104,6 +104,16 @@ class Zend_Ldap_Collection implements Iterator, Countable
     }
 
     /**
+     * Returns the underlying iterator
+     *
+     * @return Zend_Ldap_Collection_Iterator_Default
+     */
+    public function getInnerIterator()
+    {
+        return $this->_iterator;
+    }
+
+    /**
      * Returns the number of items in current result
      * Implements Countable
      *

+ 1 - 6
library/Zend/Ldap/Collection/Iterator/Default.php

@@ -20,11 +20,6 @@
  */
 
 /**
- * @see Zend_Ldap_Collection_Iterator_Interface
- */
-require_once 'Zend/Ldap/Collection/Iterator/Interface.php';
-
-/**
  * Zend_Ldap_Collection_Iterator_Default is the default collection iterator implementation
  * using ext/ldap
  *
@@ -33,7 +28,7 @@ require_once 'Zend/Ldap/Collection/Iterator/Interface.php';
  * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
-class Zend_Ldap_Collection_Iterator_Default implements Zend_Ldap_Collection_Iterator_Interface
+class Zend_Ldap_Collection_Iterator_Default implements Iterator, Countable
 {
     /**
      * LDAP Connection

+ 0 - 46
library/Zend/Ldap/Collection/Iterator/Interface.php

@@ -1,46 +0,0 @@
-<?php
-/**
- * Zend Framework
- *
- * LICENSE
- *
- * This source file is subject to the new BSD license that is bundled
- * with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://framework.zend.com/license/new-bsd
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@zend.com so we can send you a copy immediately.
- *
- * @category   Zend
- * @package    Zend_Ldap
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id$
- */
-
-/**
- * Zend_Ldap_Collection_Iterator_Interface provides a contract for
- * adapter specific collection iterators
- *
- * @category   Zend
- * @package    Zend_Ldap
- * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- */
-interface Zend_Ldap_Collection_Iterator_Interface extends Iterator, Countable
-{
-    /**
-     * Closes the current result set
-     *
-     * @return boolean
-     */
-    public function close();
-
-    /**
-     * Gets the current LDAP connection.
-     *
-     * @return Zend_Ldap
-     */
-    public function getLdap();
-}