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-payment
Model
Method
Specification
Factory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Model\Method\Specification
;
7
8
use
Magento\Framework\ObjectManagerInterface
;
9
use
Magento\Payment\Model\Method\SpecificationInterface
;
10
14
class
Factory
15
{
21
protected
$objectManager
;
22
28
public
function
__construct
(
ObjectManagerInterface
$objectManager
)
29
{
30
$this->objectManager =
$objectManager
;
31
}
32
40
public
function
create
($specificationClass)
41
{
42
$specification = $this->objectManager->get($specificationClass);
43
if
(!$specification instanceof
SpecificationInterface
) {
44
throw
new \InvalidArgumentException(
'Specification must implement SpecificationInterface'
);
45
}
46
return
$specification;
47
}
48
}
Magento\Payment\Model\Method\Specification
Definition:
AbstractSpecification.php:6
Magento\Payment\Model\Method\Specification\Factory\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
Factory.php:28
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Payment\Model\Method\Specification\Factory\create
create($specificationClass)
Definition:
Factory.php:40
Magento\Payment\Model\Method\Specification\Factory
Definition:
Factory.php:14
Magento\Payment\Model\Method\Specification\Factory\$objectManager
$objectManager
Definition:
Factory.php:21
Magento\Payment\Model\Method\SpecificationInterface
Definition:
SpecificationInterface.php:14