private function hydrateMany(string $classPath, array $data): Collection
    {
        $collection = new Collection();
        foreach ($data as $entityData) {
            /** @var Hydratable $entity */
            $entity = new $classPath();
            $entity->hydrate($entityData);

            $collection->append($entity);
        }

        return $collection;
    }
private function hydrateMany(string $classPath, array $data): Collection
    {
        $collection = new Collection();
        foreach ($data as $entityData) {
            /** @var Hydratable $entity */
            $entity = new $classPath();
            $entity->hydrate($entityData);

            $collection->append($entity);
        }

        return $collection;
    }
private function hydrateMany ( string $ classPath , array $ data ) : Collection { $ collection = new Collection ( ) ; foreach ( $ data as $ entityData ) { /** @var Hydratable $entity */ $ entity = new $ classPath ( ) ; $ entity -> hydrate ( $ entityData ) ; $ collection -> append ( $ entity ) ; } return $ collection ; }
Hydrates a collection of many entities.
Hydrates a collection of many entities .