lib/Collection/Result/DynamicCollectionRunner.php
private function runQuery(Collection $collection, int $offset, int $limit): Iterator
    {
        $collectionQuery = $collection->getQuery();
        if (!$collectionQuery instanceof Query) {
            return new ArrayIterator();
        }

        $queryOffset = $offset - $this->getManualItemsCount($collection, 0, $offset);
        $queryLimit = $limit - $this->getManualItemsCount($collection, $offset, $offset + $limit);

        return $this->queryRunner->runQuery($collectionQuery, $queryOffset, $queryLimit);
    }
private function runQuery(Collection $collection, int $offset, int $limit): Iterator
    {
        $collectionQuery = $collection->getQuery();
        if (!$collectionQuery instanceof Query) {
            return new ArrayIterator();
        }

        $queryOffset = $offset - $this->getManualItemsCount($collection, 0, $offset);
        $queryLimit = $limit - $this->getManualItemsCount($collection, $offset, $offset + $limit);

        return $this->queryRunner->runQuery($collectionQuery, $queryOffset, $queryLimit);
    }
private function runQuery ( Collection $ collection , int $ offset , int $ limit ) : Iterator { $ collectionQuery = $ collection -> getQuery ( ) ; if ( ! $ collectionQuery instanceof Query ) { return new ArrayIterator ( ) ; } $ queryOffset = $ offset - $ this -> getManualItemsCount ( $ collection , 0 , $ offset ) ; $ queryLimit = $ limit - $ this -> getManualItemsCount ( $ collection , $ offset , $ offset + $ limit ) ; return $ this -> queryRunner -> runQuery ( $ collectionQuery , $ queryOffset , $ queryLimit ) ; }
Returns the iterator that can be used to iterate over provided collection query.
Returns the iterator that can be used to iterate over provided collection query .