Column
extends Column
in package
Tags
Table of Contents
- $default : mixed
- $isNumber : mixed
- $isText : mixed
- $limit : mixed
- $name : mixed
- $null : mixed
- $precision : mixed
- $scale : mixed
- $sqlType : mixed
- $type : mixed
- $unsigned : mixed
- __construct() : mixed
- Constructor.
- binaryToString() : string
- Used to convert from BLOBs to Strings
- extractDefault() : mixed
- getDefault() : string
- getLimit() : int
- getName() : string
- getSqlType() : string
- getType() : string
- isNull() : bool
- isNumber() : bool
- isText() : bool
- isUnsigned() : bool
- precision() : int
- scale() : int
- stringToDate() : Horde_Date
- stringToDummyTime() : Horde_Date|null
- stringToTime() : Horde_Date
- typeCast() : mixed
- Casts value (which is a String) to an appropriate instance.
- valueToBoolean() : bool
- valueToDecimal() : float
- extractLimit() : int
- extractPrecision() : int
- extractScale() : int
- extractUnsigned() : int
- setSimplifiedType() : mixed
Properties
$default
protected
mixed
$default
$isNumber
protected
mixed
$isNumber
$isText
protected
mixed
$isText
$limit
protected
mixed
$limit
$name
protected
mixed
$name
$null
protected
mixed
$null
$precision
protected
mixed
$precision
$scale
protected
mixed
$scale
$sqlType
protected
mixed
$sqlType
$type
protected
mixed
$type
$unsigned
protected
mixed
$unsigned
Methods
__construct()
Constructor.
public
__construct(string $name, string $default[, string $sqlType = null ][, bool $null = true ][, int $length = null ][, int $precision = null ][, int $scale = null ]) : mixed
Parameters
- $name : string
-
Column name, such as "supplier_id" in "supplier_id int(11)".
- $default : string
-
Type-casted default value, such as "new" in "sales_stage varchar(20) default 'new'".
- $sqlType : string = null
-
Column type.
- $null : bool = true
-
Whether this column allows NULL values.
- $length : int = null
-
Column width.
- $precision : int = null
-
Precision for NUMBER and FLOAT columns.
- $scale : int = null
-
Number of digits to the right of the decimal point in a number.
Return values
mixed —binaryToString()
Used to convert from BLOBs to Strings
public
binaryToString(mixed $value) : string
Parameters
- $value : mixed
Return values
string —extractDefault()
public
extractDefault(mixed $default) : mixed
Parameters
- $default : mixed
Return values
mixed —getDefault()
public
getDefault() : string
Return values
string —getLimit()
public
getLimit() : int
Return values
int —getName()
public
getName() : string
Return values
string —getSqlType()
public
getSqlType() : string
Return values
string —getType()
public
getType() : string
Return values
string —isNull()
public
isNull() : bool
Return values
bool —isNumber()
public
isNumber() : bool
Return values
bool —isText()
public
isText() : bool
Return values
bool —isUnsigned()
public
isUnsigned() : bool
Return values
bool —precision()
public
precision() : int
Return values
int —scale()
public
scale() : int
Return values
int —stringToDate()
public
stringToDate(string $string) : Horde_Date
Parameters
- $string : string
Return values
Horde_Date —stringToDummyTime()
public
stringToDummyTime(string $string) : Horde_Date|null
Parameters
- $string : string
Return values
Horde_Date|null —stringToTime()
public
stringToTime(string $string) : Horde_Date
Parameters
- $string : string
Return values
Horde_Date —typeCast()
Casts value (which is a String) to an appropriate instance.
public
typeCast(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —valueToBoolean()
public
valueToBoolean(mixed $value) : bool
Parameters
- $value : mixed
Return values
bool —valueToDecimal()
public
valueToDecimal(mixed $value) : float
Parameters
- $value : mixed
Return values
float —extractLimit()
protected
extractLimit(string $sqlType) : int
Parameters
- $sqlType : string
Return values
int —extractPrecision()
protected
extractPrecision(string $sqlType) : int
Parameters
- $sqlType : string
Return values
int —extractScale()
protected
extractScale(string $sqlType) : int
Parameters
- $sqlType : string
Return values
int —extractUnsigned()
protected
extractUnsigned(string $sqlType) : int
Parameters
- $sqlType : string
Return values
int —setSimplifiedType()
protected
setSimplifiedType() : mixed