yii\sphinx\Schema::getColumnPhpType PHP Метод

getColumnPhpType() защищенный Метод

Extracts the PHP type from abstract DB type.
protected getColumnPhpType ( ColumnSchema $column ) : string
$column ColumnSchema the column schema information
Результат string PHP type name
    protected function getColumnPhpType($column)
    {
        static $typeMap = ['smallint' => 'integer', 'integer' => 'integer', 'bigint' => 'integer', 'boolean' => 'boolean', 'float' => 'double'];
        if (isset($typeMap[$column->type])) {
            if ($column->type === 'bigint') {
                return PHP_INT_SIZE == 8 ? 'integer' : 'string';
            } elseif ($column->type === 'integer') {
                return PHP_INT_SIZE == 4 ? 'string' : 'integer';
            } else {
                return $typeMap[$column->type];
            }
        } else {
            return 'string';
        }
    }