StoreSwitcherInterface
Magento\Store\Model\StoreSwitcherInterface
What it does
This interface defines the contract for handling store view switching in Magento 2.
Developers implement this interface to control what happens when customers switch between different store views, including determining the correct redirect URL for the target store.
It's commonly used when building multi-store setups where you need to maintain customer context (like cart, wishlist) when switching between stores or language versions.
Public Methods
- switch()