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
Cache
InstanceFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\Cache
;
7
8
class
InstanceFactory
9
{
13
protected
$_objectManager
;
14
18
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
19
{
20
$this->_objectManager =
$objectManager
;
21
}
22
30
public
function
get
($instanceName)
31
{
32
$instance = $this->_objectManager->get($instanceName);
33
if
(!$instance instanceof \
Magento
\Framework\
Cache
\FrontendInterface) {
34
throw
new \UnexpectedValueException(
"Cache type class '{$instanceName}' has to be a cache frontend."
);
35
}
36
37
return
$instance;
38
}
39
}
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\App\Cache
Definition:
Cache.php:13
Magento\Framework\App\Cache\InstanceFactory
Definition:
InstanceFactory.php:8
Magento\Framework\App\Cache\InstanceFactory\$_objectManager
$_objectManager
Definition:
InstanceFactory.php:13
Magento\Framework\App\Cache
Definition:
FlushCacheByTags.php:7
Magento\Framework\App\Cache\InstanceFactory\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
InstanceFactory.php:18
Magento