Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
IndexNameResolver.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
11 
16 {
23  private $additionalTableSuffix = '_replica';
24 
28  private $indexScopeResolver;
29 
33  public function __construct(
34  IndexScopeResolverInterface $indexScopeResolver
35  ) {
36  $this->indexScopeResolver = $indexScopeResolver;
37  }
38 
42  public function resolveName(IndexName $indexName): string
43  {
44  $tableName = $this->indexScopeResolver->resolve($indexName->getIndexId(), $indexName->getDimensions());
45 
46  if ($indexName->getAlias()->getValue() === Alias::ALIAS_REPLICA) {
48  }
49  return $tableName;
50  }
51 
57  public function getAdditionalTableName(string $tableName): string
58  {
59  return $tableName . $this->additionalTableSuffix;
60  }
61 }
$tableName
Definition: trigger.php:13
__construct(IndexScopeResolverInterface $indexScopeResolver)