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
magento2-base
setup
src
Magento
Setup
Module
Di
Compiler
Config
Chain
BackslashTrim.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Setup\Module\Di\Compiler\Config\Chain
;
8
9
use
Magento\Setup\Module\Di\Compiler\Config\ModificationInterface
;
10
11
class
BackslashTrim
implements
ModificationInterface
12
{
19
public
function
modify
(array
$config
)
20
{
21
if
(!isset(
$config
[
'arguments'
])) {
22
return
$config
;
23
}
24
25
$config
[
'arguments'
] = $this->resolveInstancesNames(
$config
[
'arguments'
]);
26
$this->resolveArguments(
$config
[
'arguments'
]);
27
28
return
$config
;
29
}
30
37
private
function
resolveInstancesNames(array
$arguments
)
38
{
39
$resolvedInstances = [];
40
foreach
(
$arguments
as $instance => $constructor) {
41
$resolvedInstances[ltrim($instance,
'\\'
)] = $constructor;
42
}
43
44
return
$resolvedInstances;
45
}
46
53
private
function
resolveArguments(&$argument)
54
{
55
if
(!is_array($argument)) {
56
return
;
57
}
58
59
foreach
($argument as $key => &
$value
) {
60
if
(in_array($key, [
'_i_'
,
'_ins_'
],
true
)) {
61
$value
= ltrim(
$value
,
'\\'
);
62
continue
;
63
}
64
65
if
(is_array(
$value
)) {
66
$this->resolveArguments(
$value
);
67
}
68
}
69
return
;
70
}
71
}
Magento\Setup\Module\Di\Compiler\Config\Chain\BackslashTrim
Definition:
BackslashTrim.php:11
$config
$config
Definition:
fraud_order.php:17
Magento\Setup\Module\Di\Compiler\Config\Chain
Definition:
ArgumentsSerialization.php:7
Magento\Setup\Module\Di\Compiler\Config\Chain\BackslashTrim\modify
modify(array $config)
Definition:
BackslashTrim.php:19
$value
$value
Definition:
gender.phtml:16
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Setup\Module\Di\Compiler\Config\ModificationInterface
Definition:
ModificationInterface.php:13