protected function getColumnPhpType($column)
    {
        static $typeMap = [ // abstract type => php type
            'smallint' => 'integer',
            'integer' => 'integer',
            'bigint' => 'integer',
            'timestamp' => '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' || $column->type === 'timestamp') {
                return PHP_INT_SIZE == 4 ? 'string' : 'integer';
            } else {
                return $typeMap[$column->type];
            }
        } else {
            return 'string';
        }
    }
protected function getColumnPhpType($column)
    {
        static $typeMap = [ // abstract type => php type
            'smallint' => 'integer',
            'integer' => 'integer',
            'bigint' => 'integer',
            'timestamp' => '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' || $column->type === 'timestamp') {
                return PHP_INT_SIZE == 4 ? 'string' : 'integer';
            } else {
                return $typeMap[$column->type];
            }
        } else {
            return 'string';
        }
    }
protected function getColumnPhpType ( $ column ) { static $ typeMap = [ // abstract type => php type 'smallint' => 'integer' , 'integer' => 'integer' , 'bigint' => 'integer' , 'timestamp' => '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' || $ column -> type === 'timestamp' ) { return PHP_INT_SIZE == 4 ? 'string' : 'integer' ; } else { return $ typeMap [ $ column -> type ] ; } } else { return 'string' ; } }
Extracts the PHP type from abstract DB type.
@param ColumnSchema $column the column schema information
@return string PHP type name
Extracts the PHP type from abstract DB type .