6 declare(strict_types=1);
28 private $storeRepository;
41 \
Magento\Framework\
App\Config\ReinitableConfigInterface $config,
42 \
Magento\
Store\Api\StoreRepositoryInterface $storeRepository,
43 \
Magento\Framework\
App\Request\PathInfo $pathInfo
47 $this->pathInfo = $pathInfo;
61 if (empty($pathInfo)) {
62 $pathInfo = $this->pathInfo->getPathInfo(
73 $this->storeRepository->getActiveStoreByCode(
$storeCode);
75 if ((
bool)$this->config->getValue(
84 }
catch (\
Magento\
Store\Model\StoreIsInactiveException $e) {
97 private function getStoreCode(
string $pathInfo) : string
99 $pathParts = explode(
'/', ltrim($pathInfo,
'/'), 2);
100 return current($pathParts);
getValidStoreCode(\Magento\Framework\App\Request\Http $request, string $pathInfo='')
const XML_PATH_STORE_IN_URL
__construct(\Magento\Framework\App\Config\ReinitableConfigInterface $config, \Magento\Store\Api\StoreRepositoryInterface $storeRepository, \Magento\Framework\App\Request\PathInfo $pathInfo)