public function hydrateCollection(array $classes, Traversable $resultSet)
    {
        $collection = new ArrayCollection();
        foreach ($resultSet as $document) {
            foreach ($classes as $class) {
                if ($document->getIndex() == $class->index && $document->getType() == $class->type) {
                    break;
                }
            }
            $collection[] = $this->hydrateEntity($class, $document);
        }

        return $collection;
    }
public function hydrateCollection(array $classes, Traversable $resultSet)
    {
        $collection = new ArrayCollection();
        foreach ($resultSet as $document) {
            foreach ($classes as $class) {
                if ($document->getIndex() == $class->index && $document->getType() == $class->type) {
                    break;
                }
            }
            $collection[] = $this->hydrateEntity($class, $document);
        }

        return $collection;
    }
public function hydrateCollection ( array $ classes , Traversable $ resultSet ) { $ collection = new ArrayCollection ( ) ; foreach ( $ resultSet as $ document ) { foreach ( $ classes as $ class ) { if ( $ document -> getIndex ( ) == $ class -> index && $ document -> getType ( ) == $ class -> type ) { break ; } } $ collection [ ] = $ this -> hydrateEntity ( $ class , $ document ) ; } return $ collection ; }
Construct an entity collection

@param array $classes
@param Traversable $resultSet
Construct an entity collection