コード例 #1
0
 public function __construct($columnName, $defaultValue, $enumValues)
 {
     if ($defaultValue === null || !in_array($defaultValue, $enumValues)) {
         throw new \Rhubarb\Stem\Exceptions\SchemaException("The enum column does not have a default matching one of the enum values.");
     }
     parent::__construct($columnName, $defaultValue);
     $this->enumValues = $enumValues;
 }
コード例 #2
0
 public function addColumn(Column $column)
 {
     $columns = func_get_args();
     $specificColumns = [];
     foreach ($columns as $column) {
         $specificColumns[] = $column->getRepositorySpecificColumn("MySql");
     }
     call_user_func_array("parent::addColumn", $specificColumns);
     foreach ($specificColumns as $column) {
         if (method_exists($column, "getIndex")) {
             $index = $column->getIndex();
             if ($index !== false) {
                 $this->addIndex($index);
             }
         }
     }
 }
コード例 #3
0
 public function __construct($columnName)
 {
     parent::__construct($columnName, $this->getNewContainerObject());
 }