You are here

public function HydratingIteratorIterator::current in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php \Zend\Hydrator\Iterator\HydratingIteratorIterator::current()

Return value

object Returns hydrated clone of $prototype

File

vendor/zendframework/zend-hydrator/src/Iterator/HydratingIteratorIterator.php, line 71

Class

HydratingIteratorIterator

Namespace

Zend\Hydrator\Iterator

Code

public function current() {
  $currentValue = parent::current();
  $object = clone $this->prototype;
  $this->hydrator
    ->hydrate($currentValue, $object);
  return $object;
}