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
QueryFactory.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\DB
;
8
12
class
QueryFactory
13
{
17
protected
$objectManager
;
18
22
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
23
{
24
$this->objectManager =
$objectManager
;
25
}
26
35
public
function
create
(
$className
, array
$arguments
= [])
36
{
37
$query
= $this->objectManager->create(
$className
,
$arguments
);
38
if
(!
$query
instanceof
QueryInterface
) {
39
throw
new \Magento\Framework\Exception\LocalizedException(
40
new
\
Magento
\Framework\
Phrase
(
41
'%1 doesn\'t implement \Magento\Framework\DB\QueryInterface'
,
42
[
$className
]
43
)
44
);
45
}
46
return
$query
;
47
}
48
}
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\DB\QueryInterface
Definition:
QueryInterface.php:11
Magento\Framework\DB
Definition:
AbstractMapper.php:6
Magento
$query
$query
Definition:
popular_query.php:9
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\DB\QueryFactory\create
create($className, array $arguments=[])
Definition:
QueryFactory.php:35
Magento\Framework\DB\QueryFactory
Definition:
QueryFactory.php:12
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\DB\QueryFactory\$objectManager
$objectManager
Definition:
QueryFactory.php:17
Magento\Framework\DB\QueryFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
QueryFactory.php:22
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31