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
DB
Adapter
Pdo
MysqlFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\DB\Adapter\Pdo
;
7
8
use
Magento\Framework\App\ObjectManager
;
9
use
Magento\Framework\DB\LoggerInterface
;
10
use
Magento\Framework\DB\SelectFactory
;
11
use
Magento\Framework\ObjectManagerInterface
;
12
16
class
MysqlFactory
17
{
21
private
$objectManager;
22
28
public
function
__construct
(
29
ObjectManagerInterface
$objectManager
30
) {
31
$this->objectManager =
$objectManager
;
32
}
33
44
public
function
create
(
45
$className
,
46
array
$config
,
47
LoggerInterface
$logger
=
null
,
48
SelectFactory
$selectFactory =
null
49
) {
50
if
(!in_array(Mysql::class, class_parents(
$className
,
true
) + [
$className
=>
$className
])) {
51
throw
new \InvalidArgumentException(
'Invalid class, '
.
$className
.
' must extend '
. Mysql::class .
'.'
);
52
}
53
$arguments
= [
54
'config'
=>
$config
55
];
56
if
(
$logger
) {
57
$arguments
[
'logger'
] =
$logger
;
58
}
59
if
($selectFactory) {
60
$arguments
[
'selectFactory'
] = $selectFactory;
61
}
62
return
$this->objectManager->create(
63
$className
,
64
$arguments
65
);
66
}
67
}
Magento\Framework\DB\Adapter\Pdo\MysqlFactory\create
create( $className, array $config, LoggerInterface $logger=null, SelectFactory $selectFactory=null)
Definition:
MysqlFactory.php:44
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\DB\LoggerInterface
Definition:
LoggerInterface.php:11
$config
$config
Definition:
fraud_order.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$logger
$logger
Definition:
health_check.php:20
Magento\Framework\DB\SelectFactory
Definition:
SelectFactory.php:18
Magento\Framework\App\ObjectManager
Definition:
ConfigCache.php:8
Magento\Framework\DB\Adapter\Pdo\MysqlFactory
Definition:
MysqlFactory.php:16
Magento\Framework\DB\Adapter\Pdo
Definition:
Mysql.php:7
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\DB\Adapter\Pdo\MysqlFactory\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
MysqlFactory.php:28
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31