protected function doFetch()
{
while ($element = $this->iterator->fetch()) {
if ($this->endPosition !== null && $this->position >= $this->endPosition) {
return null;
} elseif ($this->position >= $this->startPosition) {
$this->position++;
return $element;
} else {
$this->position++;
}
}
}