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
Option
ArrayPool.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Option
;
7
11
class
ArrayPool
12
{
16
protected
$_objectManager
;
17
21
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
)
22
{
23
$this->_objectManager =
$objectManager
;
24
}
25
33
public
function
get
(
$model
)
34
{
35
$modelInstance = $this->_objectManager->get(
$model
);
36
if
(
false
== $modelInstance instanceof \
Magento
\Framework\Option\
ArrayInterface
) {
37
throw
new \InvalidArgumentException(
$model
.
'doesn\'t implement \Magento\Framework\Option\ArrayInterface'
);
38
}
39
return
$modelInstance;
40
}
41
}
Magento\Framework\Option
Definition:
ArrayInterface.php:6
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$model
$model
Definition:
enable_catalog_product_reindex_schedule.php:9
Magento\Framework\Option\ArrayPool
Definition:
ArrayPool.php:11
Magento\Framework\Option\ArrayInterface
Definition:
ArrayInterface.php:11
Magento\Framework\Option\ArrayPool\$_objectManager
$_objectManager
Definition:
ArrayPool.php:16
Magento
Magento\Framework\Option\ArrayPool\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition:
ArrayPool.php:21