for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Storage package
*
* (c) Michal Wachowski <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Moss\Storage\Model\Definition\Index;
/**
* Defines unique index for model
* @author Michal Wachowski <[email protected]>
* @package Moss\Storage
class Unique extends Index
{
protected $table;
protected $name;
protected $type;
protected $fields = [];
* Constructor
* @param string $name
* @param array $fields
public function __construct($name, array $fields)
$this->name = $name;
$this->type = 'unique';
$this->assertFields($fields);
$this->fields = $fields;
}