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
Config
Dom
NodePathMatcher.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Config\Dom
;
7
11
class
NodePathMatcher
12
{
20
public
function
match
(
$pathPattern
, $xpathSubject)
21
{
22
$pathSubject = $this->
simplifyXpath
($xpathSubject);
23
$pathPattern
=
'#^'
.
$pathPattern
.
'$#'
;
24
return
(
bool
)preg_match(
$pathPattern
, $pathSubject);
25
}
26
33
protected
function
simplifyXpath
($xpath)
34
{
35
$result
= $xpath;
36
$result
= preg_replace(
'/\[@[^\]]+?\]/'
,
''
,
$result
);
37
$result
= preg_replace(
'/\/[^:]+?\:/'
,
'/'
,
$result
);
38
return
$result
;
39
}
40
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
$pathPattern
$pathPattern
Definition:
deployTestModules.php:33
Magento\Framework\Config\Dom
Definition:
ArrayNodeConfig.php:6
Magento\Framework\Config\Dom\NodePathMatcher\match
match($pathPattern, $xpathSubject)
Definition:
NodePathMatcher.php:20
Magento\Framework\Config\Dom\NodePathMatcher
Definition:
NodePathMatcher.php:11
Magento\Framework\Config\Dom\NodePathMatcher\simplifyXpath
simplifyXpath($xpath)
Definition:
NodePathMatcher.php:33