src/EntitySpecificationRepositoryTrait.php
public function iterate($specification, ResultModifier $modifier = null)
    {
        foreach ($this->getQuery($specification, $modifier)->iterate() as $row) {
            yield current($row);
        }
    }
public function iterate($specification, ResultModifier $modifier = null)
    {
        foreach ($this->getQuery($specification, $modifier)->iterate() as $row) {
            yield current($row);
        }
    }
public function iterate ( $ specification , ResultModifier $ modifier = null ) { foreach ( $ this -> getQuery ( $ specification , $ modifier ) -> iterate ( ) as $ row ) { yield current ( $ row ) ; } }
Iterate results when you match with a Specification.

@param Filter|QueryModifier $specification
@param ResultModifier|null  $modifier

@return mixed[]|\Generator
Iterate results when you match with a Specification .