Properties

$name

$name : string

Type

string

$type

$type : string

Type

string

$limit

$limit : integer

Type

integer

$null

$null : boolean

Type

boolean

$default

$default : mixed

Type

mixed

$identity

$identity : boolean

Type

boolean

$precision

$precision : integer

Type

integer

$scale

$scale : integer

Type

integer

$after

$after : string

Type

string

$update

$update : string

Type

string

$comment

$comment : string

Type

string

$signed

$signed : boolean

Type

boolean

$timezone

$timezone : boolean

Type

boolean

$properties

$properties : array

Type

array

$values

$values : array

Type

array

Methods

setName()

setName(string  $name) : $this

Sets the column name.

Parameters

string $name

Returns

$this

getName()

getName() : string

Gets the column name.

Returns

string

setType()

setType(string  $type) : $this

Sets the column type.

Parameters

string $type

Returns

$this

getType()

getType() : string

Gets the column type.

Returns

string

setLimit()

setLimit(integer  $limit) : $this

Sets the column limit.

Parameters

integer $limit

Returns

$this

getLimit()

getLimit() : integer

Gets the column limit.

Returns

integer

setNull()

setNull(boolean  $null) : $this

Sets whether the column allows nulls.

Parameters

boolean $null

Returns

$this

getNull()

getNull() : boolean

Gets whether the column allows nulls.

Returns

boolean

isNull()

isNull() : boolean

Does the column allow nulls?

Returns

boolean

setDefault()

setDefault(mixed  $default) : $this

Sets the default column value.

Parameters

mixed $default

Returns

$this

getDefault()

getDefault() : mixed

Gets the default column value.

Returns

mixed

setIdentity()

setIdentity(boolean  $identity) : $this

Sets whether or not the column is an identity column.

Parameters

boolean $identity

Returns

$this

getIdentity()

getIdentity() : boolean

Gets whether or not the column is an identity column.

Returns

boolean

isIdentity()

isIdentity() : boolean

Is the column an identity column?

Returns

boolean

setAfter()

setAfter(string  $after) : $this

Sets the name of the column to add this column after.

Parameters

string $after

After

Returns

$this

getAfter()

getAfter() : string

Returns the name of the column to add this column after.

Returns

string

setUpdate()

setUpdate(string  $update) : $this

Sets the 'ON UPDATE' mysql column function.

Parameters

string $update

On Update function

Returns

$this

getUpdate()

getUpdate() : string

Returns the value of the ON UPDATE column function.

Returns

string

setPrecision()

setPrecision(integer  $precision) : $this

Sets the column precision for decimal.

Parameters

integer $precision

Returns

$this

getPrecision()

getPrecision() : integer

Gets the column precision for decimal.

Returns

integer

setScale()

setScale(integer  $scale) : $this

Sets the column scale for decimal.

Parameters

integer $scale

Returns

$this

getScale()

getScale() : integer

Gets the column scale for decimal.

Returns

integer

setComment()

setComment(string  $comment) : $this

Sets the column comment.

Parameters

string $comment

Returns

$this

getComment()

getComment() : string

Gets the column comment.

Returns

string

setSigned()

setSigned(boolean  $signed) : $this

Sets whether field should be signed.

Parameters

boolean $signed

Returns

$this

getSigned()

getSigned() : string

Gets whether field should be signed.

Returns

string

isSigned()

isSigned() : boolean

Should the column be signed?

Returns

boolean

setTimezone()

setTimezone(boolean  $timezone) : $this

Sets whether the field should have a timezone identifier.

Used for date/time columns only!

Parameters

boolean $timezone

Returns

$this

getTimezone()

getTimezone() : boolean

Gets whether field has a timezone identifier.

Returns

boolean

isTimezone()

isTimezone() : boolean

Should the column have a timezone?

Returns

boolean

setProperties()

setProperties(array  $properties) : $this

Sets field properties.

Parameters

array $properties

Returns

$this

getProperties()

getProperties() : array

Gets field properties

Returns

array

setValues()

setValues(  $values) : $this

Sets field values.

Parameters

$values

Returns

$this

getValues()

getValues() : string

Gets field values

Returns

string

setOptions()

setOptions(array  $options) : $this

Utility method that maps an array of column options to this objects methods.

Parameters

array $options

Options

Returns

$this

getValidOptions()

getValidOptions() : array

Gets all allowed options. Each option must have a corresponding `setFoo` method.

Returns

array

getAliasedOptions()

getAliasedOptions() : array

Gets all aliased options. Each alias must reference a valid option.

Returns

array