SimpleQuery: Provide a getter for the current iterator position

refs #8615
This commit is contained in:
Johannes Meyer 2015-08-06 09:39:23 +02:00
parent c891b9d356
commit 7662545c2a
3 changed files with 30 additions and 0 deletions

View File

@ -143,6 +143,16 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
return $this->ds;
}
/**
* Return the current position of this query's iterator
*
* @return int
*/
public function getIteratorPosition()
{
return $this->iteratorPosition;
}
/**
* Start or rewind the iteration
*/

View File

@ -605,6 +605,16 @@ class RepositoryQuery implements QueryInterface, SortRules, Iterator
return $this->query->count();
}
/**
* Return the current position of this query's iterator
*
* @return int
*/
public function getIteratorPosition()
{
return $this->query->getIteratorPosition();
}
/**
* Start or rewind the iteration
*/

View File

@ -69,6 +69,16 @@ abstract class DataView implements QueryInterface, SortRules, IteratorAggregate
return $this->getQuery();
}
/**
* Return the current position of the result set's iterator
*
* @return int
*/
public function getIteratorPosition()
{
return $this->query->getIteratorPosition();
}
/**
* Get the query name this data view relies on
*