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
App
ResourceConnection
SourceFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\ResourceConnection
;
7
8
class
SourceFactory
9
{
13
protected
$objectManager
;
14
18
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
19
{
20
$this->objectManager =
$objectManager
;
21
}
22
30
public
function
create
(
$className
)
31
{
32
$source
= $this->objectManager->create(
$className
);
33
if
(!
$source
instanceof
SourceProviderInterface
) {
34
throw
new \InvalidArgumentException(
35
$className
.
' doesn\'t implement \Magento\Framework\App\ResourceConnection\SourceProviderInterface'
36
);
37
}
38
39
return
$source
;
40
}
41
}
Magento\Framework\App\ResourceConnection\SourceFactory\create
create($className)
Definition:
SourceFactory.php:30
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$source
$source
Definition:
source.php:23
Magento\Framework\App\ResourceConnection\SourceFactory
Definition:
SourceFactory.php:8
Magento\Framework\App\ResourceConnection\SourceFactory\$objectManager
$objectManager
Definition:
SourceFactory.php:13
Magento\Framework\App\ResourceConnection\SourceFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
SourceFactory.php:18
Magento\Framework\App\ResourceConnection\SourceProviderInterface
Definition:
SourceProviderInterface.php:12
Magento
Magento\Framework\App\ResourceConnection
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31