| 1 | <?php |
||
| 7 | class Unique implements ConstraintInterface |
||
| 8 | { |
||
| 9 | private $columns; |
||
| 10 | private $table; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Constructor. |
||
| 14 | * |
||
| 15 | * @param array|string $columns Column names. |
||
| 16 | * @param datatype $table Table instance. |
||
| 17 | */ |
||
| 18 | public function __construct($columns, Table $table = null) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | public function getName() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | */ |
||
| 38 | |||
| 39 | public function getTable() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Set table instance. |
||
| 46 | * |
||
| 47 | * @param Table $table Table instance. |
||
| 48 | * |
||
| 49 | * @return PrimaryKey Self. |
||
| 50 | */ |
||
| 51 | public function setTable(Table $table) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get column names. |
||
| 60 | * |
||
| 61 | * @return array Column names. |
||
| 62 | */ |
||
| 63 | public function getColumns() |
||
| 67 | } |
||
| 68 |