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
framework
GraphQl
Schema
Type
Input
InputFactory.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\GraphQl\Schema\Type\Input
;
9
10
use
Magento\Framework\GraphQl\Config\ConfigElementInterface
;
11
use
Magento\Framework\GraphQl\Schema\Type\InputTypeInterface
;
12
use
Magento\Framework\ObjectManagerInterface
;
13
14
class
InputFactory
15
{
19
private
$objectManager;
20
24
private
$prototypes;
25
29
private
$typeRegistry;
30
35
public
function
__construct
(
36
ObjectManagerInterface
$objectManager,
37
array $prototypes
38
) {
39
$this->objectManager =
$objectManager
;
40
$this->prototypes = $prototypes;
41
}
42
47
public
function
create
(
ConfigElementInterface
$configElement) :
InputTypeInterface
48
{
49
if
(!isset($this->typeRegistry[$configElement->
getName
()])) {
50
$this->typeRegistry[$configElement->
getName
()] =
51
$this->objectManager->create(
52
$this->prototypes[get_class($configElement)],
53
[
54
'configElement'
=> $configElement
55
]
56
);
57
}
58
return
$this->typeRegistry[$configElement->
getName
()];
59
}
60
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\GraphQl\Config\ConfigElementInterface
Definition:
ConfigElementInterface.php:13
Magento\Framework\GraphQl\Schema\Type\Input\InputFactory\create
create(ConfigElementInterface $configElement)
Definition:
InputFactory.php:47
Magento\Framework\GraphQl\Config\ConfigElementInterface\getName
getName()
Magento\Framework\GraphQl\Schema\Type\Input
Definition:
InputFactory.php:8
Magento\Framework\GraphQl\Schema\Type\Input\InputFactory\__construct
__construct(ObjectManagerInterface $objectManager, array $prototypes)
Definition:
InputFactory.php:35
Magento\Framework\GraphQl\Schema\Type\InputTypeInterface
Definition:
InputTypeInterface.php:15
Magento\Framework\GraphQl\Schema\Type\Input\InputFactory
Definition:
InputFactory.php:14