class Column (View source)

The Column class.

Constants

SIGNED

UNSIGNED

ALLOW_NULL

NOT_NULL

Methods

__construct(string $name = null, string $type = 'text', bool $signed = false, bool $allowNull = false, string $default = null, string $comment = '', array $options = array())

Class init.

string
getName()

Method to get property Name

name(string $name)

Method to set property name

string
getType()

Method to get property Type

type(string $type)

Method to set property type

string
getPosition()

Method to get property Position

position(string $position)

Method to set property position

string
getComment()

Method to get property Comment

comment(string $comment)

Method to set property comment

boolean
getSigned()

Method to get property Signed

signed(boolean $signed = true)

Method to set property signed

boolean
getAllowNull()

Method to get property AllowNull

allowNull(boolean $allowNull = true)

Method to set property allowNull

string
getDefault()

Method to get property Default

defaultValue(string $default)

Method to set property default

boolean
getAutoIncrement()

Method to get property AutoIncrement

autoIncrement(boolean $autoIncrement = true)

Method to set property autoIncrement

int
getLength()

Method to get property Length

length(int $length)

Method to set property length

setOptions(array $options)

setOptions

boolean
isPrimary()

Method to get property Primary

primary(boolean $primary)

Method to set property primary

Details

at line line 119
__construct(string $name = null, string $type = 'text', bool $signed = false, bool $allowNull = false, string $default = null, string $comment = '', array $options = array())

Class init.

Parameters

string $name
string $type
bool $signed
bool $allowNull
string $default
string $comment
array $options

at line line 136
string getName()

Method to get property Name

Return Value

string

at line line 148
Column name(string $name)

Method to set property name

Parameters

string $name

Return Value

Column Return self to support chaining.

at line line 160
string getType()

Method to get property Type

Return Value

string

at line line 172
Column type(string $type)

Method to set property type

Parameters

string $type

Return Value

Column Return self to support chaining.

at line line 184
string getPosition()

Method to get property Position

Return Value

string

at line line 196
Column position(string $position)

Method to set property position

Parameters

string $position

Return Value

Column Return self to support chaining.

at line line 208
string getComment()

Method to get property Comment

Return Value

string

at line line 220
Column comment(string $comment)

Method to set property comment

Parameters

string $comment

Return Value

Column Return self to support chaining.

at line line 232
boolean getSigned()

Method to get property Signed

Return Value

boolean

at line line 244
Column signed(boolean $signed = true)

Method to set property signed

Parameters

boolean $signed

Return Value

Column Return self to support chaining.

at line line 256
boolean getAllowNull()

Method to get property AllowNull

Return Value

boolean

at line line 268
Column allowNull(boolean $allowNull = true)

Method to set property allowNull

Parameters

boolean $allowNull

Return Value

Column Return self to support chaining.

at line line 280
string getDefault()

Method to get property Default

Return Value

string

at line line 292
Column defaultValue(string $default)

Method to set property default

Parameters

string $default

Return Value

Column Return self to support chaining.

at line line 304
boolean getAutoIncrement()

Method to get property AutoIncrement

Return Value

boolean

at line line 316
Column autoIncrement(boolean $autoIncrement = true)

Method to set property autoIncrement

Parameters

boolean $autoIncrement

Return Value

Column Return self to support chaining.

at line line 328
int getLength()

Method to get property Length

Return Value

int

at line line 340
Column length(int $length)

Method to set property length

Parameters

int $length

Return Value

Column Return self to support chaining.

at line line 354
Column setOptions(array $options)

setOptions

Parameters

array $options

Return Value

Column

at line line 386
boolean isPrimary()

Method to get property Primary

Return Value

boolean

at line line 398
Column primary(boolean $primary)

Method to set property primary

Parameters

boolean $primary

Return Value

Column Return self to support chaining.