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
Interception
Definition
Runtime.php
Go to the documentation of this file.
1
<?php
9
namespace
Magento\Framework\Interception\Definition
;
10
11
use
Magento\Framework\Interception\DefinitionInterface
;
12
13
class
Runtime
implements
DefinitionInterface
14
{
18
protected
$_typesByPrefixes
= [
19
'befor'
=>
self::LISTENER_BEFORE
,
20
'aroun'
=>
self::LISTENER_AROUND
,
21
'after'
=>
self::LISTENER_AFTER
,
22
];
23
29
protected
$prefixLengths
= [
30
self::LISTENER_BEFORE => 6,
31
self::LISTENER_AROUND => 6,
32
self::LISTENER_AFTER => 5,
33
];
34
41
public
function
getMethodList
(
$type
)
42
{
43
$methods
= [];
44
$allMethods = get_class_methods(
$type
);
45
if
($allMethods) {
46
foreach
($allMethods as
$method
) {
47
$prefix
= substr(
$method
, 0, 5);
48
if
(isset($this->_typesByPrefixes[
$prefix
])) {
49
$methodName = \lcfirst(substr(
$method
, $this->prefixLengths[$this->_typesByPrefixes[
$prefix
]]));
50
$methods
[$methodName] = isset(
51
$methods
[$methodName]
52
) ?
$methods
[$methodName] | $this->_typesByPrefixes[
$prefix
] : $this->_typesByPrefixes[
$prefix
];
53
}
54
}
55
}
56
return
$methods
;
57
}
58
}
Magento\Framework\Interception\Definition\Runtime\getMethodList
getMethodList($type)
Definition:
Runtime.php:41
Magento\Framework\Interception\Definition\Runtime\$_typesByPrefixes
$_typesByPrefixes
Definition:
Runtime.php:18
$type
$type
Definition:
item.phtml:13
$prefix
$prefix
Definition:
name.phtml:25
$methods
$methods
Definition:
billing.phtml:71
Magento\Framework\Interception\Definition\Runtime\$prefixLengths
$prefixLengths
Definition:
Runtime.php:29
Magento\Framework\Interception\DefinitionInterface\LISTENER_AFTER
const LISTENER_AFTER
Definition:
DefinitionInterface.php:20
Magento\Framework\Interception\Definition\Runtime
Definition:
Runtime.php:13
Magento\Framework\Interception\DefinitionInterface\LISTENER_BEFORE
const LISTENER_BEFORE
Definition:
DefinitionInterface.php:16
Magento\Framework\Interception\Definition
Definition:
Runtime.php:9
Magento\Framework\Interception\DefinitionInterface\LISTENER_AROUND
const LISTENER_AROUND
Definition:
DefinitionInterface.php:18
$method
$method
Definition:
info.phtml:13
Magento\Framework\Interception\DefinitionInterface
Definition:
DefinitionInterface.php:14