public function current()
{
if (!$this->valid()) {
return;
}
$document = $this->items[$this->position];
if ($document instanceof $this->entityClass) {
return $document;
}
$schema = $this->getSchemaForEntity();
$entityAssembler = Ioc::make(EntityAssembler::class, [$schema]);
return $entityAssembler->assemble($document, $schema);
}