Skip to content

Commit a4762b0

Browse files
committed
fixed service location
1 parent b7a1034 commit a4762b0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Model/EntitySettingsLocator.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ public function locate(string $indexName): \Spameri\ElasticQuery\Mapping\Setting
3030
}
3131

3232

33-
public function locateAll(): array
33+
public function locateAll(): \Generator
3434
{
3535
/** @var array<\Spameri\Elastic\Settings\IndexConfigInterface> $settings */
36-
$settings = $this->container->getByType(\Spameri\Elastic\Settings\IndexConfigInterface::class);
37-
38-
return $settings;
36+
$serviceNames = $this->container->findByType(\Spameri\Elastic\Settings\IndexConfigInterface::class);
37+
foreach ($serviceNames as $serviceName) {
38+
yield $this->container->getService($serviceName);
39+
}
3940
}
4041

4142
}

0 commit comments

Comments
 (0)