| Total Complexity | 7 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Coverage | 23.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class SchemaIndexDefinitionEventArgs extends SchemaEventArgs |
||
| 13 | { |
||
| 14 | /** @var Index|null */ |
||
| 15 | private $index = null; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Raw index data as fetched from the database. |
||
| 19 | * |
||
| 20 | * @var mixed[] |
||
| 21 | */ |
||
| 22 | private $tableIndex; |
||
| 23 | |||
| 24 | /** @var string */ |
||
| 25 | private $table; |
||
| 26 | |||
| 27 | /** @var Connection */ |
||
| 28 | private $connection; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param mixed[] $tableIndex |
||
| 32 | * @param string $table |
||
| 33 | */ |
||
| 34 | 26 | public function __construct(array $tableIndex, $table, Connection $connection) |
|
| 35 | { |
||
| 36 | 26 | $this->tableIndex = $tableIndex; |
|
| 37 | 26 | $this->table = $table; |
|
| 38 | 26 | $this->connection = $connection; |
|
| 39 | 26 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Allows to clear the index which means the index will be excluded from tables index list. |
||
| 43 | * |
||
| 44 | * @return SchemaIndexDefinitionEventArgs |
||
| 45 | */ |
||
| 46 | public function setIndex(?Index $index = null) |
||
| 47 | { |
||
| 48 | $this->index = $index; |
||
| 49 | |||
| 50 | return $this; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return Index|null |
||
| 55 | */ |
||
| 56 | 26 | public function getIndex() |
|
| 57 | { |
||
| 58 | 26 | return $this->index; |
|
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return mixed[] |
||
| 63 | */ |
||
| 64 | public function getTableIndex() |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getTable() |
||
| 73 | { |
||
| 74 | return $this->table; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return Connection |
||
| 79 | */ |
||
| 80 | public function getConnection() |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return AbstractPlatform |
||
| 87 | */ |
||
| 88 | public function getDatabasePlatform() |
||
| 91 | } |
||
| 92 | } |
||
| 93 |