| 1 | <?php |
||
| 12 | final class IndexDefinition |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | private $index; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $unique; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param array $columns |
||
| 26 | * @param bool $unique |
||
| 27 | */ |
||
| 28 | public function __construct(array $columns, bool $unique = false) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function getColumns(): array |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public function isUnique(): bool |
||
| 49 | |||
| 50 | /** |
||
| 51 | * So we can compare indexes. |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function __toString() |
||
| 62 | } |