Class Xyster_Db_Gateway_TableBuilder_Column

Description

A column for the tablebuilder

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Db/Gateway/TableBuilder/Column.php (line 24)


	
			
Variable Summary
Method Summary
Xyster_Db_Gateway_TableBuilder_Column __construct (string $name,  $type, [mixed $argument = null])
void defaultValue (mixed $value)
void foreign (string $table, string $column, [ $onDelete = null], [ $onUpdate = null])
mixed getArgument ()
Xyster_Db_DataType getDataType ()
mixed getDefault ()
Xyster_Db_ReferentialAction getForeignKeyOnDelete ()
Xyster_Db_ReferentialAction getForeignKeyOnUpdate ()
string getForeignKeyTable ()
string getName ()
boolean isForeign ()
boolean isNull ()
boolean isPrimary ()
boolean isUnique ()
void null ([boolean $allow = true])
void primary ()
void unique ()
Variables
mixed $_argument (line 28)
  • access: protected
mixed $_default (line 29)
  • access: protected
  • access: protected
mixed $_name (line 26)
  • access: protected
mixed $_null = true (line 30)
  • access: protected
mixed $_primary = false (line 35)
  • access: protected
mixed $_type (line 27)
  • access: protected
mixed $_unique = false (line 36)
  • access: protected
Methods
Constructor __construct (line 45)

Creates a new column

  • access: public
Xyster_Db_Gateway_TableBuilder_Column __construct (string $name,  $type, [mixed $argument = null])
  • string $name: The column name
  • Xyster_Db_DataType $type: The data type
  • mixed $argument: An optional argument for the data type
defaultValue (line 177)

Sets the default value for the column

  • access: public
void defaultValue (mixed $value)
  • mixed $value
foreign (line 190)

Sets the column to be a foreign key

  • access: public
void foreign (string $table, string $column, [ $onDelete = null], [ $onUpdate = null])
  • string $table
  • string $column
  • Xyster_Db_ReferentialAction $onDelete
  • Xyster_Db_ReferentialAction $onUpdate
getArgument (line 57)

Gets the argument for the data type

  • access: public
mixed getArgument ()
getDataType (line 77)

Gets the data type of the column

  • access: public
Xyster_Db_DataType getDataType ()
getDefault (line 87)

Gets the default value for the column

  • access: public
mixed getDefault ()
getForeignKeyColumn (line 107)

Gets the column name for the foreign key

  • access: public
string getForeignKeyColumn ()
getForeignKeyOnDelete (line 117)

Gets the action to perform ondelete

  • access: public
Xyster_Db_ReferentialAction getForeignKeyOnDelete ()
getForeignKeyOnUpdate (line 127)

Gets the action to perform onupdate

  • access: public
Xyster_Db_ReferentialAction getForeignKeyOnUpdate ()
getForeignKeyTable (line 97)

Gets the table name for the foreign key

  • access: public
string getForeignKeyTable ()
getName (line 67)

Gets the name of the column

  • access: public
string getName ()
isForeign (line 137)

Returns true if the column is a foreign key

  • access: public
boolean isForeign ()
isNull (line 157)

Returns true if the column allows null values

  • access: public
boolean isNull ()
isPrimary (line 147)

Returns true if the column is a primary key

  • access: public
boolean isPrimary ()
isUnique (line 167)

Returns true if the column is uniquely indexed

  • access: public
boolean isUnique ()
null (line 202)

Sets whether the column can accept null

  • access: public
void null ([boolean $allow = true])
  • boolean $allow: True for NULL, false for NOT NULL
primary (line 211)

Sets the column to be a primary key

  • access: public
void primary ()
unique (line 220)

Sets the column to be uniquely indexed

  • access: public
void unique ()

Documentation generated on Mon, 19 May 2008 17:08:16 -0400 by phpDocumentor 1.4.2