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
ObjectManager.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App
;
7
8
use
Magento\Framework\ObjectManager\FactoryInterface
;
9
20
class
ObjectManager
extends
\Magento\Framework\ObjectManager\ObjectManager
21
{
25
protected
static
$_instance
;
26
33
public
static
function
getInstance
()
34
{
35
if
(!self::$_instance instanceof \
Magento
\Framework\
ObjectManagerInterface
) {
36
throw
new \RuntimeException(
'ObjectManager isn\'t initialized'
);
37
}
38
return
self::$_instance
;
39
}
40
48
public
static
function
setInstance
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
49
{
50
self::$_instance =
$objectManager
;
51
}
52
58
public
function
__construct
(
59
FactoryInterface
$factory
,
60
\
Magento
\Framework\
ObjectManager
\
ConfigInterface
$config
,
61
array &$sharedInstances = []
62
) {
63
parent::__construct(
$factory
,
$config
, $sharedInstances);
64
self::$_instance = $this;
65
}
66
}
Magento\Framework\App
Magento\Framework\App\ObjectManager\getInstance
static getInstance()
Definition:
ObjectManager.php:33
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\Event\ConfigInterface
Definition:
ConfigInterface.php:14
$config
$config
Definition:
fraud_order.php:17
Magento\Framework\ObjectManager\FactoryInterface
Definition:
FactoryInterface.php:14
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\App\ObjectManager\setInstance
static setInstance(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
ObjectManager.php:48
Magento\Framework\App\ObjectManager\$_instance
static $_instance
Definition:
ObjectManager.php:25
Magento\Framework\ObjectManager\ObjectManager
Definition:
ObjectManager.php:15
Magento
$factory
$factory
Definition:
category_multiple_stores.php:10
Magento\Framework\App\ObjectManager\__construct
__construct(FactoryInterface $factory, \Magento\Framework\ObjectManager\ConfigInterface $config, array &$sharedInstances=[])
Definition:
ObjectManager.php:58
Magento\Framework\App\ObjectManager
Definition:
ObjectManager.php:20