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
EntityManager
HydratorPool.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\EntityManager
;
7
8
use
Magento\Framework\ObjectManagerInterface
;
9
13
class
HydratorPool
14
{
18
private
$hydrators;
19
23
protected
$objectManager
;
24
29
public
function
__construct
(
30
ObjectManagerInterface
$objectManager
,
31
$hydrators = []
32
) {
33
$this->objectManager =
$objectManager
;
34
$this->hydrators = $hydrators;
35
}
36
41
public
function
getHydrator
(
$entityType
)
42
{
43
if
(isset($this->hydrators[
$entityType
])) {
44
return
$this->objectManager->get($this->hydrators[
$entityType
]);
45
}
else
{
46
return
$this->objectManager->get(HydratorInterface::class);
47
}
48
}
49
}
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Framework\EntityManager
Definition:
AbstractModelHydrator.php:6
Magento\Framework\EntityManager\HydratorPool\getHydrator
getHydrator($entityType)
Definition:
HydratorPool.php:41
Magento\Framework\EntityManager\HydratorPool
Definition:
HydratorPool.php:13
Magento\Framework\EntityManager\HydratorPool\__construct
__construct(ObjectManagerInterface $objectManager, $hydrators=[])
Definition:
HydratorPool.php:29
Magento\Framework\EntityManager\HydratorPool\$objectManager
$objectManager
Definition:
HydratorPool.php:23