We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7a1034 commit a4762b0Copy full SHA for a4762b0
1 file changed
src/Model/EntitySettingsLocator.php
@@ -30,12 +30,13 @@ public function locate(string $indexName): \Spameri\ElasticQuery\Mapping\Setting
30
}
31
32
33
- public function locateAll(): array
+ public function locateAll(): \Generator
34
{
35
/** @var array<\Spameri\Elastic\Settings\IndexConfigInterface> $settings */
36
- $settings = $this->container->getByType(\Spameri\Elastic\Settings\IndexConfigInterface::class);
37
-
38
- return $settings;
+ $serviceNames = $this->container->findByType(\Spameri\Elastic\Settings\IndexConfigInterface::class);
+ foreach ($serviceNames as $serviceName) {
+ yield $this->container->getService($serviceName);
39
+ }
40
41
42
0 commit comments