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
ObjectManager
Relations
Runtime.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\ObjectManager\Relations
;
7
8
class
Runtime
implements
\Magento\Framework\ObjectManager\RelationsInterface
9
{
13
protected
$_classReader
;
14
20
protected
$_default
= [];
21
25
public
function
__construct
(\
Magento
\Framework\Code\Reader\ClassReaderInterface $classReader =
null
)
26
{
27
$this->_classReader = $classReader ?: new \Magento\Framework\Code\Reader\ClassReader();
28
}
29
36
public
function
has
(
$type
)
37
{
38
return
class_exists
(
$type
) || interface_exists(
$type
);
39
}
40
47
public
function
getParents
(
$type
)
48
{
49
if
(!
class_exists
(
$type
)) {
50
return
$this->_default
;
51
}
52
return
$this->_classReader->getParents(
$type
) ?:
$this->_default
;
53
}
54
}
Magento\Framework\ObjectManager\Relations\Runtime
Definition:
Runtime.php:8
Magento\Framework\ObjectManager\Relations\Runtime\__construct
__construct(\Magento\Framework\Code\Reader\ClassReaderInterface $classReader=null)
Definition:
Runtime.php:25
Magento\Framework\ObjectManager\Relations\Runtime\getParents
getParents($type)
Definition:
Runtime.php:47
$type
$type
Definition:
item.phtml:13
Magento\Framework\ObjectManager\Relations
Definition:
Runtime.php:6
Magento\Framework\ObjectManager\Relations\Runtime\$_classReader
$_classReader
Definition:
Runtime.php:13
Magento
Magento\Framework\Code\Generator\class_exists
class_exists($className)
Definition:
DefinedClassesTest.php:15
Magento\Framework\ObjectManager\Relations\Runtime\$_default
$_default
Definition:
Runtime.php:20
Magento\Framework\ObjectManager\RelationsInterface
Definition:
RelationsInterface.php:12
Magento\Framework\ObjectManager\Relations\Runtime\has
has($type)
Definition:
Runtime.php:36