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
Setup
Declaration
Schema
TableNameResolver.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\Setup\Declaration\Schema
;
9
13
class
TableNameResolver
14
{
20
private
$filterPattern =
''
;
21
31
public
function
getNameOfOriginTable
(
string
$tableName
): string
32
{
33
$tableIsReplica = preg_match($this->getFilterPattern(),
$tableName
, $matches);
34
35
return
$tableIsReplica ? $matches[
'table_name'
] :
$tableName
;
36
}
37
43
private
function
getFilterPattern(): string
44
{
45
if
(!$this->filterPattern) {
46
$this->filterPattern =
'#(?<table_name>\S+)_replica$#i'
;
47
}
48
49
return
$this->filterPattern;
50
}
51
}
$tableName
$tableName
Definition:
trigger.php:13
Magento\Framework\Setup\Declaration\Schema\TableNameResolver\getNameOfOriginTable
getNameOfOriginTable(string $tableName)
Definition:
TableNameResolver.php:31
Magento\Framework\Setup\Declaration\Schema\TableNameResolver
Definition:
TableNameResolver.php:13
Magento\Framework\Setup\Declaration\Schema
Definition:
Comparator.php:7