classes/iterator/IndexIterator.php
private function avoidBackwardDuplicates(array &$results)
    {
        // applies only on the last step of backward iteration
        if ($this->direction == KeyReader::DIRECTION_FORWARD || $this->offset >= 0) {
            return;
            
        }
        
        // get the minimum of the last iteration
        $lastResults = $this->iterator->getArrayCopy();
        if (empty($lastResults)) {
            return;
            
        }
        $lastMinimum = end($lastResults)->getKey();
        
        // reduce the results
        $reducedResults = array();
        foreach ($results as $result) {
            if ($result->getKey() >= $lastMinimum) {
                continue;

            }
            $reducedResults[] = $result;

        }
        $results = $reducedResults;
    }
private function avoidBackwardDuplicates(array &$results)
    {
        // applies only on the last step of backward iteration
        if ($this->direction == KeyReader::DIRECTION_FORWARD || $this->offset >= 0) {
            return;
            
        }
        
        // get the minimum of the last iteration
        $lastResults = $this->iterator->getArrayCopy();
        if (empty($lastResults)) {
            return;
            
        }
        $lastMinimum = end($lastResults)->getKey();
        
        // reduce the results
        $reducedResults = array();
        foreach ($results as $result) {
            if ($result->getKey() >= $lastMinimum) {
                continue;

            }
            $reducedResults[] = $result;

        }
        $results = $reducedResults;
    }
private function avoidBackwardDuplicates ( array & $ results ) { // applies only on the last step of backward iteration if ( $ this -> direction == KeyReader :: DIRECTION_FORWARD || $ this -> offset >= 0 ) { return ; } // get the minimum of the last iteration $ lastResults = $ this -> iterator -> getArrayCopy ( ) ; if ( empty ( $ lastResults ) ) { return ; } $ lastMinimum = end ( $ lastResults ) -> getKey ( ) ; // reduce the results $ reducedResults = array ( ) ; foreach ( $ results as $ result ) { if ( $ result -> getKey ( ) >= $ lastMinimum ) { continue ; } $ reducedResults [ ] = $ result ; } $ results = $ reducedResults ; }
Removes results which were found in the previous iteration.

This applies to backward iteration only
Removes results which were found in the previous iteration .