LazyRecord\Schema\DeclareColumn::__construct PHP Метод

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

column name (id)
public __construct ( DeclareSchema $schema, $name = null, $type = null )
$schema DeclareSchema
    public function __construct(DeclareSchema $schema, $name = null, $type = null)
    {
        $this->schema = $schema;
        $this->attributeTypes = $this->attributeTypes + array('primary' => self::ATTR_FLAG, 'size' => self::ATTR_INTEGER, 'autoIncrement' => self::ATTR_FLAG, 'immutable' => self::ATTR_FLAG, 'unique' => self::ATTR_FLAG, 'null' => self::ATTR_FLAG, 'notNull' => self::ATTR_FLAG, 'typeConstraint' => self::ATTR_FLAG, 'timezone' => self::ATTR_FLAG, 'renderable' => self::ATTR_FLAG, 'findable' => self::ATTR_FLAG, 'label' => self::ATTR_ANY, 'desc' => self::ATTR_STRING, 'comment' => self::ATTR_STRING, 'refer' => self::ATTR_STRING, 'default' => self::ATTR_ANY, 'validator' => self::ATTR_ANY, 'validatorArgs' => self::ATTR_ANY, 'validValues' => self::ATTR_ANY, 'validValueBuilder' => self::ATTR_CALLABLE, 'optionValues' => self::ATTR_ANY, 'validPairs' => self::ATTR_ANY, 'canonicalizer' => self::ATTR_CALLABLE, 'virtual' => self::ATTR_FLAG, 'required' => self::ATTR_FLAG, 'filter' => self::ATTR_CALLABLE, 'inflator' => self::ATTR_CALLABLE, 'deflator' => self::ATTR_CALLABLE, 'renderAs' => self::ATTR_STRING, 'widgetAttributes' => self::ATTR_ARRAY, 'contentType' => self::ATTR_STRING, 'primaryField' => self::ATTR_FLAG);
        parent::__construct($name, $type);
    }

Usage Example

 public function __construct(DeclareSchema $schema, $name = 'id', $type = 'integer')
 {
     parent::__construct($schema, $name);
     $this->type($type)->isa('int')->notNull()->unsigned()->primary()->autoIncrement()->renderAs('HiddenInput');
 }
All Usage Examples Of LazyRecord\Schema\DeclareColumn::__construct