Storm\Drivers\Base\Relational\Traits\Index::__construct PHP Метод

__construct() публичный Метод

public __construct ( $Name, array $Columns, $Type = IndexType::Plain )
$Columns array
    public function __construct($Name, array $Columns, $Type = IndexType::Plain)
    {
        $this->Name = $Name;
        $this->Columns = array_values($Columns);
        $this->ColumnNames = array_map(function ($Column) {
            return $Column->GetName();
        }, $this->Columns);
        $this->Type = $Type;
    }

Usage Example

Пример #1
0
 public function __construct($Name, array $Columns, $Type = IndexType::Plain, $StorageType = IndexStorageType::BTree)
 {
     parent::__construct($Name, $Columns, $Type);
     if ($Type !== IndexType::FullText) {
         $this->StorageType = $StorageType;
     }
 }