Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AlterTable Class Reference

Public Member Functions

 __construct ($table= '')
 
 setTable ($name)
 
 addColumn (Column\ColumnInterface $column)
 
 changeColumn ($name, Column\ColumnInterface $column)
 
 dropColumn ($name)
 
 dropConstraint ($name)
 
 addConstraint (Constraint\ConstraintInterface $constraint)
 
 getRawState ($key=null)
 
- Public Member Functions inherited from AbstractSql
 getSqlString (PlatformInterface $adapterPlatform=null)
 Get SQL string for statement.
Parameters
null | PlatformInterface$adapterPlatform
Returns
string

 

Public Attributes

const ADD_COLUMNS = 'addColumns'
 
const ADD_CONSTRAINTS = 'addConstraints'
 
const CHANGE_COLUMNS = 'changeColumns'
 
const DROP_COLUMNS = 'dropColumns'
 
const DROP_CONSTRAINTS = 'dropConstraints'
 
const TABLE = 'table'
 

Protected Member Functions

 processTable (PlatformInterface $adapterPlatform=null)
 
 processAddColumns (PlatformInterface $adapterPlatform=null)
 
 processChangeColumns (PlatformInterface $adapterPlatform=null)
 
 processDropColumns (PlatformInterface $adapterPlatform=null)
 
 processAddConstraints (PlatformInterface $adapterPlatform=null)
 
 processDropConstraints (PlatformInterface $adapterPlatform=null)
 
- Protected Member Functions inherited from AbstractSql
 buildSqlString (PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 renderTable ($table, $alias=null)
 Render table with alias in from/join parts.
 
 processExpression (ExpressionInterface $expression, PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null, $namedParameterPrefix=null)
 int $runtimeExpressionPrefix
 
 createSqlFromSpecificationAndParameters ($specifications, $parameters)
 
 processSubSelect (Select $subselect, PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 processJoin (Join $joins, PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 resolveColumnValue ($column, PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null, $namedParameterPrefix=null)
 
 resolveTable ($table, PlatformInterface $platform, DriverInterface $driver=null, ParameterContainer $parameterContainer=null)
 
 localizeVariables ()
 Copy variables from the subject into the local properties.
 

Protected Attributes

 $addColumns = []
 
 $addConstraints = []
 
 $changeColumns = []
 
 $dropColumns = []
 
 $dropConstraints = []
 
 $specifications
 
 $table = ''
 
- Protected Attributes inherited from AbstractSql
 $specifications = []
 
 $processInfo = ['paramPrefix' => ''
 
 $instanceParameterIndex = []
 

Constructor & Destructor Documentation

__construct (   $table = '')
Parameters
string$table

Member Function Documentation

addColumn ( Column\ColumnInterface  $column)
Parameters
Column\ColumnInterface$column
Returns
self
addConstraint ( Constraint\ConstraintInterface  $constraint)
Parameters
Constraint\ConstraintInterface$constraint
Returns
self
changeColumn (   $name,
Column\ColumnInterface  $column 
)
Parameters
string$name
Column\ColumnInterface$column
Returns
self
dropColumn (   $name)
Parameters
string$name
Returns
self
dropConstraint (   $name)
Parameters
string$name
Returns
self
getRawState (   $key = null)
Parameters
string | null$key
Returns
array
processAddColumns ( PlatformInterface  $adapterPlatform = null)
protected
processAddConstraints ( PlatformInterface  $adapterPlatform = null)
protected
processChangeColumns ( PlatformInterface  $adapterPlatform = null)
protected
processDropColumns ( PlatformInterface  $adapterPlatform = null)
protected
processDropConstraints ( PlatformInterface  $adapterPlatform = null)
protected
processTable ( PlatformInterface  $adapterPlatform = null)
protected
setTable (   $name)
Parameters
string$name
Returns
self

Member Data Documentation

$addColumns = []
protected
$addConstraints = []
protected
$changeColumns = []
protected
$dropColumns = []
protected
$dropConstraints = []
protected
$specifications
protected
Initial value:
= [
self::TABLE => "ALTER TABLE %1\$s\n"
$table = ''
protected
const ADD_COLUMNS = 'addColumns'
const ADD_CONSTRAINTS = 'addConstraints'
const CHANGE_COLUMNS = 'changeColumns'
const DROP_COLUMNS = 'dropColumns'
const DROP_CONSTRAINTS = 'dropConstraints'
const TABLE = 'table'