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
Communication
Config
ConfigParser.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Communication\Config
;
8
9
use
Magento\Framework\Exception\LocalizedException
;
10
use
Magento\Framework\Phrase
;
11
15
class
ConfigParser
16
{
17
const
TYPE_NAME
=
'typeName'
;
18
const
METHOD_NAME
=
'methodName'
;
19
27
public
function
parseServiceMethod
($serviceMethod)
28
{
29
$pattern
=
'/^([a-zA-Z]+[a-zA-Z0-9\\\\]+)::([a-zA-Z0-9]+)$/'
;
30
preg_match(
$pattern
, $serviceMethod, $matches);
31
if
(!isset($matches[1]) || !isset($matches[2])) {
32
throw
new
LocalizedException
(
33
new
Phrase
(
34
'The "%serviceMethod" service method must match the "%pattern" pattern.'
,
35
[
'serviceMethod'
=> $serviceMethod,
'pattern'
=>
$pattern
]
36
)
37
);
38
}
39
$className
= $matches[1];
40
$methodName = $matches[2];
41
return
[self::TYPE_NAME =>
$className
, self::METHOD_NAME => $methodName];
42
}
43
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
$pattern
$pattern
Definition:
website.php:22
Magento\Framework\Communication\Config
Definition:
CompositeReader.php:6
Magento\Framework\Communication\Config\ConfigParser\TYPE_NAME
const TYPE_NAME
Definition:
ConfigParser.php:17
Magento\Framework\Communication\Config\ConfigParser\parseServiceMethod
parseServiceMethod($serviceMethod)
Definition:
ConfigParser.php:27
Magento\Framework\Communication\Config\ConfigParser
Definition:
ConfigParser.php:15
Magento\Framework\Communication\Config\ConfigParser\METHOD_NAME
const METHOD_NAME
Definition:
ConfigParser.php:18
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31