Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Constraint.php
Go to the documentation of this file.
1 <?php
7 
12 class Constraint extends GenericElement implements
15 {
20  const TYPE = 'constraint';
21 
25  const PRIMARY_TYPE = 'primary';
26 
30  const UNIQUE_TYPE = 'unique';
31 
35  private $table;
36 
40  private $nameWithoutPrefix;
41 
50  public function __construct(
51  string $name,
52  string $type,
53  Table $table,
54  string $nameWithoutPrefix
55  ) {
56  parent::__construct($name, $type);
57  $this->table = $table;
58  $this->nameWithoutPrefix = $nameWithoutPrefix;
59  }
60 
66  public function getTable()
67  {
68  return $this->table;
69  }
70 
74  public function getElementType()
75  {
76  return self::TYPE;
77  }
78 
84  public function getNameWithoutPrefix()
85  {
86  return $this->nameWithoutPrefix;
87  }
88 }
__construct(string $name, string $type, Table $table, string $nameWithoutPrefix)
Definition: Constraint.php:50
$type
Definition: item.phtml:13
$table
Definition: trigger.php:14
if(!isset($_GET['name'])) $name
Definition: log.php:14