<?php

/**
 * IIterator interface.
 * 
 * Contains basic methods to be implemented by any Iterator class.
 * This class extends internal PHP interface <em>Iterator</em>, with only two 
 * differences: this class provides a constructor that follows the 
 * <em>Collection</em> standard, and this class provides an alias method for
 * <em>valid()</em>, called <em>hasMore()</em>. It's very annoying when you 
 * must implement two methods for the same use (one will point to the other), 
 * but I think that <em>hasMore()</em> is the proper signature for this method, 
 * and that's the method that will be used inside this framework.
 * <br />
 * <strong>Note:</strong> You can see the commented code for Iterator method's 
 * signatures in the source code for this file.
 * 
 * @author  $Author: pruna $
 * @package common/collection
 * @version $Revision: 1.1 $
 * @created 10-Jan-2004
 * @modified $Date: 2005/12/06 02:56:45 $
 */
interface IIterator extends Iterator {
    
    /**
     * Constructor must accept a collection as parameter.
     *
     * @param     ICollection    $collection    Initial elements
     * @access    public
     */
    public function __construct($collection = null);
    
    /**
     * Test if there stills data to traverse.
     *
     * @access     public
     * @return     boolean
     */
    public function hasMore();
    
    /**
     * Retrieve current item value.
     * 
     * @access     public
     * @return     mixed
     */
    //public function current();
    
    /**
     * Current item's key.
     * 
     * @access     public
     * @return     mixed (string or int)
     */
    //public function key();
    
    /**
     * Iterate on the next element.
     * 
     * @access     public
     * @return     mixed
     */
    //public function next();
    
    /**
     * Rewinds internal cursor.
     * 
     * @access     public
     * @return     void
     */
    //public function rewind();
    
}

?>