Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
IndexName.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
12 
18 class IndexName
19 {
23  private $indexId;
24 
28  private $dimensions;
29 
33  private $alias;
34 
41  public function __construct(string $indexId, array $dimensions, Alias $alias)
42  {
43  foreach ($dimensions as $dimension) {
44  if (!$dimension instanceof Dimension) {
45  throw new LocalizedException(
46  new Phrase('Dimension have to be instance of Dimension class.')
47  );
48  }
49  }
50 
51  $this->indexId = $indexId;
52  $this->dimensions = $dimensions;
53  $this->alias = $alias;
54  }
55 
59  public function getIndexId(): string
60  {
61  return $this->indexId;
62  }
63 
67  public function getDimensions(): array
68  {
69  return $this->dimensions;
70  }
71 
75  public function getAlias(): Alias
76  {
77  return $this->alias;
78  }
79 }
__construct(string $indexId, array $dimensions, Alias $alias)
Definition: IndexName.php:41
if(!trim($html)) $alias
Definition: details.phtml:20