PHP 클래스 yii\db\ColumnSchema

부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\base\Object
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$allowNull whether this column can be null.
$autoIncrement whether this column is auto-incremental
$comment comment of this column. Not all DBMS support this.
$dbType the DB type of this column. Possible DB types vary according to the type of DBMS.
$defaultValue default value of this column
$enumValues enumerable values. This is set only if the column is declared to be an enumerable type.
$isPrimaryKey whether this column is a primary key
$name name of this column (without quotes).
$phpType the PHP type of this column. Possible PHP types include: string, boolean, integer, double.
$precision precision of the column data, if it is numeric.
$scale scale of the column data, if it is numeric.
$size display size of the column.
$type abstract type of this column. Possible abstract types include: char, string, text, boolean, smallint, integer, bigint, float, decimal, datetime, timestamp, time, date, binary, and money.
$unsigned whether this column is unsigned. This is only meaningful when [[type]] is smallint, integer or bigint.

공개 메소드들

메소드 설명
dbTypecast ( mixed $value ) : mixed Converts the input value according to [[type]] and [[dbType]] for use in a db query.
phpTypecast ( mixed $value ) : mixed Converts the input value according to [[phpType]] after retrieval from the database.

보호된 메소드들

메소드 설명
typecast ( mixed $value ) : mixed Converts the input value according to [[phpType]] after retrieval from the database.

메소드 상세

dbTypecast() 공개 메소드

If the value is null or an [[Expression]], it will not be converted.
public dbTypecast ( mixed $value ) : mixed
$value mixed input value
리턴 mixed converted value. This may also be an array containing the value as the first element and the PDO type as the second element.

phpTypecast() 공개 메소드

If the value is null or an [[Expression]], it will not be converted.
public phpTypecast ( mixed $value ) : mixed
$value mixed input value
리턴 mixed converted value

typecast() 보호된 메소드

If the value is null or an [[Expression]], it will not be converted.
부터: 2.0.3
protected typecast ( mixed $value ) : mixed
$value mixed input value
리턴 mixed converted value

프로퍼티 상세

$allowNull 공개적으로 프로퍼티

whether this column can be null.
public $allowNull

$autoIncrement 공개적으로 프로퍼티

whether this column is auto-incremental
public $autoIncrement

$comment 공개적으로 프로퍼티

comment of this column. Not all DBMS support this.
public $comment

$dbType 공개적으로 프로퍼티

the DB type of this column. Possible DB types vary according to the type of DBMS.
public $dbType

$defaultValue 공개적으로 프로퍼티

default value of this column
public $defaultValue

$enumValues 공개적으로 프로퍼티

enumerable values. This is set only if the column is declared to be an enumerable type.
public $enumValues

$isPrimaryKey 공개적으로 프로퍼티

whether this column is a primary key
public $isPrimaryKey

$name 공개적으로 프로퍼티

name of this column (without quotes).
public $name

$phpType 공개적으로 프로퍼티

the PHP type of this column. Possible PHP types include: string, boolean, integer, double.
public $phpType

$precision 공개적으로 프로퍼티

precision of the column data, if it is numeric.
public $precision

$scale 공개적으로 프로퍼티

scale of the column data, if it is numeric.
public $scale

$size 공개적으로 프로퍼티

display size of the column.
public $size

$type 공개적으로 프로퍼티

abstract type of this column. Possible abstract types include: char, string, text, boolean, smallint, integer, bigint, float, decimal, datetime, timestamp, time, date, binary, and money.
public $type

$unsigned 공개적으로 프로퍼티

whether this column is unsigned. This is only meaningful when [[type]] is smallint, integer or bigint.
public $unsigned