Model
StoreResolver
Magento\Store\Model\StoreResolver
What it does
The StoreResolver class determines which store should be used for the current request in a multi-store Magento setup.
It checks multiple sources (URL path, GET parameters, cookies) to identify the requested store and returns the appropriate store ID, falling back to the default store if needed.
Developers use this when they need to programmatically determine the current active store context.
Public Methods
- getCurrentStoreId()