We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32757f6 commit c99d4f1Copy full SHA for c99d4f1
src/Server/Builder.php
@@ -434,11 +434,23 @@ public function addPrompt(
434
}
435
436
/**
437
- * @param LoaderInterface[] $loaders
+ * Register a single custom loader.
438
*/
439
- public function addLoaders(...$loaders): self
+ public function addLoader(LoaderInterface $loader): self
440
{
441
- $this->loaders = [...$this->loaders, ...$loaders];
+ $this->loaders[] = $loader;
442
+
443
+ return $this;
444
+ }
445
446
+ /**
447
+ * @param iterable<LoaderInterface> $loaders
448
+ */
449
+ public function addLoaders(iterable $loaders): self
450
+ {
451
+ foreach ($loaders as $loader) {
452
+ $this->loaders = [$loader];
453
454
455
return $this;
456
0 commit comments