0 follower

Interface Yiisoft\Db\Schema\Column\ColumnFactoryInterface

Implemented byYiisoft\Db\Schema\Column\AbstractColumnFactory

The interface must be implemented by a column factory class. It should create an instance of {@see ColumnInterface} for a database column type and initialize column information.

Public Methods

Hide inherited methods

Method Description Defined By
fromDbType() Creates an instance of {@see ColumnInterface} for a database column type and initializes column information. Yiisoft\Db\Schema\Column\ColumnFactoryInterface
fromDefinition() Creates an instance of {@see ColumnInterface} for a database column definition and initializes column information. Yiisoft\Db\Schema\Column\ColumnFactoryInterface
fromPseudoType() Creates an instance of {@see ColumnInterface} for a pseudo-type and initializes column information. Yiisoft\Db\Schema\Column\ColumnFactoryInterface
fromType() Creates an instance of {@see ColumnInterface} for an abstract database type and initializes column information. Yiisoft\Db\Schema\Column\ColumnFactoryInterface

Method Details

Hide inherited methods

fromDbType() public abstract method

Creates an instance of {@see ColumnInterface} for a database column type and initializes column information.

public abstract Yiisoft\Db\Schema\Column\ColumnInterface fromDbType ( string $dbType, array $info = [] )
$dbType string

The database column type.

$info array

The column information. The set of parameters may be different for a specific DBMS.

                public function fromDbType(string $dbType, array $info = []): ColumnInterface;

            
fromDefinition() public abstract method

Creates an instance of {@see ColumnInterface} for a database column definition and initializes column information.

The definition string can contain a native database column type or {@see \Yiisoft\Db\Constant\ColumnType abstract} type or {@see \Yiisoft\Db\Constant\PseudoType pseudo} type, its size, default value, etc.

For example, varchar(255) NOT NULL is varchar database type with 255 size and a NOT NULL constraint.

public abstract Yiisoft\Db\Schema\Column\ColumnInterface fromDefinition ( string $definition, array $info = [] )
$definition string

The database column definition.

$info array

The column information. The set of parameters may be different for a specific DBMS.

                public function fromDefinition(string $definition, array $info = []): ColumnInterface;

            
fromPseudoType() public abstract method

Creates an instance of {@see ColumnInterface} for a pseudo-type and initializes column information.

public abstract Yiisoft\Db\Schema\Column\ColumnInterface fromPseudoType ( string $pseudoType, array $info = [] )
$pseudoType string

The pseudo-type.

$info array

The column information. The set of parameters may be different for a specific DBMS.

                public function fromPseudoType(string $pseudoType, array $info = []): ColumnInterface;

            
fromType() public abstract method

Creates an instance of {@see ColumnInterface} for an abstract database type and initializes column information.

public abstract Yiisoft\Db\Schema\Column\ColumnInterface fromType ( string $type, array $info = [] )
$type string

The abstract database type.

$info array

The column information. The set of parameters may be different for a specific DBMS.

                public function fromType(string $type, array $info = []): ColumnInterface;