Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-graph-ql
Controller
HttpHeaderProcessor
StoreProcessor.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\GraphQl\Controller\HttpHeaderProcessor
;
9
10
use
Magento\Framework\Exception\NoSuchEntityException
;
11
use
Magento\Framework\GraphQl\Exception\GraphQlInputException
;
12
use
Magento\GraphQl\Controller\HttpHeaderProcessorInterface
;
13
use
Magento\Store\Model\StoreManagerInterface
;
14
18
class
StoreProcessor
implements
HttpHeaderProcessorInterface
19
{
23
private
$storeManager;
24
30
public
function
__construct
(
StoreManagerInterface
$storeManager)
31
{
32
$this->storeManager =
$storeManager
;
33
}
34
41
public
function
processHeaderValue
(
string
$headerValue) : void
42
{
43
if
($headerValue) {
44
$storeCode
= ltrim(rtrim($headerValue));
45
$stores
= $this->storeManager->getStores(
false
,
true
);
46
if
(isset(
$stores
[
$storeCode
])) {
47
$this->storeManager->setCurrentStore(
$storeCode
);
48
}
elseif
(strtolower(
$storeCode
) !==
'default'
) {
49
throw
new
GraphQlInputException
(
50
new
\
Magento
\Framework\Phrase(
'Store code %1 does not exist'
, [
$storeCode
])
51
);
52
}
53
}
54
}
55
}
elseif
elseif(isset( $params[ 'redirect_parent']))
Definition:
iframe.phtml:17
Magento\GraphQl\Controller\HttpHeaderProcessor\StoreProcessor\__construct
__construct(StoreManagerInterface $storeManager)
Definition:
StoreProcessor.php:30
$storeManager
$storeManager
Definition:
paypal_quote.php:14
Magento\GraphQl\Controller\HttpHeaderProcessorInterface
Definition:
HttpHeaderProcessorInterface.php:13
Magento\GraphQl\Controller\HttpHeaderProcessor\StoreProcessor
Definition:
StoreProcessor.php:18
$storeCode
$storeCode
Definition:
indexer.php:15
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
Magento\GraphQl\Controller\HttpHeaderProcessor\StoreProcessor\processHeaderValue
processHeaderValue(string $headerValue)
Definition:
StoreProcessor.php:41
Magento
$stores
$stores
Definition:
website_attribute_sync.php:95
Magento\GraphQl\Controller\HttpHeaderProcessor
Definition:
ContentTypeProcessor.php:8
Magento\Framework\GraphQl\Exception\GraphQlInputException
Definition:
GraphQlInputException.php:16
Magento\Framework\Exception\NoSuchEntityException
Definition:
NoSuchEntityException.php:16