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

column name (id)
public __construct ( DeclareSchema $schema, $name = null, $type = null )
$schema DeclareSchema
 public function __construct(DeclareSchema $schema, $name = 'id', $type = 'integer')
 {
     parent::__construct($schema, $name);
     $this->type($type)->isa('int')->notNull()->unsigned()->primary()->autoIncrement()->renderAs('HiddenInput');
 }
 public function __construct()
 {
     parent::__construct('id');
     $this->isa('int')->integer()->notNull()->primary()->autoIncrement();
 }
Пример #3
0
 /**
  * TODO: the best type for UUID in mysql is BINARY(36).
  */
 public function __construct($name = 'uuid', $type = 'char', $length = 36)
 {
     parent::__construct($name);
     $this->type($type)->isa('str')->length($length)->notNull()->primary();
 }