6 declare(strict_types=1);
21 private $storeSwitchers;
29 foreach ($storeSwitchers as $switcherName => $switcherInstance) {
31 throw new \InvalidArgumentException(
32 "Store switcher '{$switcherName}' is expected to implement interface " 33 . StoreSwitcherInterface::class
37 $this->storeSwitchers = $storeSwitchers;
50 $targetUrl = $redirectUrl;
52 foreach ($this->storeSwitchers as $storeSwitcher) {
53 $targetUrl = $storeSwitcher->switch($fromStore, $targetStore, $targetUrl);
__construct(array $storeSwitchers)