Total Complexity | 6 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 26.92% |
Changes | 0 |
1 | <?php |
||
13 | class SchemaIndexDefinitionEventArgs extends SchemaEventArgs |
||
14 | { |
||
15 | /** @var Index|null */ |
||
16 | private $index; |
||
17 | |||
18 | /** |
||
19 | * Raw index data as fetched from the database. |
||
20 | * |
||
21 | * @var array<string, mixed> |
||
22 | */ |
||
23 | private $tableIndex; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $table; |
||
27 | |||
28 | /** @var Connection */ |
||
29 | private $connection; |
||
30 | |||
31 | /** |
||
32 | * @param array<string, mixed> $tableIndex |
||
33 | */ |
||
34 | 26 | public function __construct(array $tableIndex, string $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 $this |
||
45 | */ |
||
46 | public function setIndex(?Index $index) : self |
||
51 | } |
||
52 | |||
53 | 26 | public function getIndex() : ?Index |
|
54 | { |
||
55 | 26 | return $this->index; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return array<string, mixed> |
||
60 | */ |
||
61 | public function getTableIndex() : array |
||
64 | } |
||
65 | |||
66 | public function getTable() : string |
||
67 | { |
||
68 | return $this->table; |
||
69 | } |
||
70 | |||
71 | public function getConnection() : Connection |
||
74 | } |
||
75 | } |
||
76 |