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
Setup
Patch
PatchFactory.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Setup\Patch
;
8
9
use
Magento\Framework\ObjectManagerInterface
;
10
15
class
PatchFactory
16
{
20
private
$objectManager;
21
25
public
function
__construct
(
ObjectManagerInterface
$objectManager)
26
{
27
$this->objectManager =
$objectManager
;
28
}
29
37
public
function
create
($instanceName,
$arguments
= [])
38
{
39
$patchInstance = $this->objectManager->create(
'\\'
. $instanceName,
$arguments
);
40
if
(!$patchInstance instanceof
PatchInterface
) {
41
throw
new \InvalidArgumentException(
42
sprintf(
43
"%s should implement %s interface"
,
44
$instanceName,
45
PatchInterface::class
46
)
47
);
48
}
49
50
return
$patchInstance;
51
}
52
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\Setup\Patch\PatchInterface
Definition:
PatchInterface.php:11
Magento\Framework\Setup\Patch\PatchFactory\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
PatchFactory.php:25
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\Setup\Patch
Definition:
DataPatchInterface.php:6
Magento\Framework\Setup\Patch\PatchFactory\create
create($instanceName, $arguments=[])
Definition:
PatchFactory.php:37
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\Setup\Patch\PatchFactory
Definition:
PatchFactory.php:15