PHP Class yii\sphinx\ColumnSchema

Since: 2.0
Author: Paul Klimov ([email protected])
Inheritance: extends yii\base\Object
Show file Open project: yiisoft/yii2-sphinx Class Usage Examples

Public Properties

Property Type Description
$dbType the DB type of this column. Possible DB types vary according to the type of DBMS.
$isAttribute whether this column is an attribute
$isField whether this column is a indexed field
$isMva whether this column is a multi value attribute (MVA)
$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.
$type abstract type of this column. Possible abstract types include: string, text, boolean, smallint, integer, bigint, float, decimal, datetime, timestamp, time, date, binary, and money.

Public Methods

Method Description
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.

Protected Methods

Method Description
typecast ( mixed $value ) : mixed Converts the input value according to [[phpType]] after retrieval from the database.

Method Details

dbTypecast() public method

If the value is null or an [[Expression]], it will not be converted.
public dbTypecast ( mixed $value ) : mixed
$value mixed input value
return 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() public method

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

typecast() protected method

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

Property Details

$dbType public property

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

$isAttribute public property

whether this column is an attribute
public $isAttribute

$isField public property

whether this column is a indexed field
public $isField

$isMva public property

whether this column is a multi value attribute (MVA)
public $isMva

$isPrimaryKey public property

whether this column is a primary key
public $isPrimaryKey

$name public property

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

$phpType public property

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

$type public property

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