Class:ForeignKeyConstraint - Superclass: AbstractAsset AbstractAsset
⌊ ForeignKeyConstraint
public class ForeignKeyConstraint
extends AbstractAsset
www.doctrine-project.org
Field Summary | |
---|---|
protected string | |
protected array | |
protected string | |
protected array | |
protected Table | |
protected array |
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
_name |
Constructor Summary | |
---|---|
ForeignKeyConstraint(array localColumnNames, string foreignTableName, array foreignColumnNames, string|null name, mixed options, string cascade) |
Method Summary | |
---|---|
void | |
array | |
string | |
array | |
string | |
void | getOption(mixed name) |
void | hasOption(mixed name) |
string|null | onDelete() Foreign Key onDelete status |
string|null | onUpdate() Foreign Key onUpdate status |
void | setLocalTable(Table table) |
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset | |
---|---|
getName |
protected string $_cascade = ''
protected array $_foreignColumnNames
protected string $_foreignTableName
protected array $_localColumnNames
protected Table $_localTable
protected array $_options
public ForeignKeyConstraint(array localColumnNames, string foreignTableName, array foreignColumnNames, string|null name, mixed options, string cascade)
public void getColumns()
public array getForeignColumns()
public string getForeignTableName()
public array getLocalColumns()
public string getLocalTableName()
public void getOption(mixed name)
public void hasOption(mixed name)
public string|null onDelete()
Foreign Key onDelete status
public string|null onUpdate()
Foreign Key onUpdate status
public void setLocalTable(Table table)
The abstract asset allows to reset the name of all assets without publishing this to the public userland.
This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables array($tableName => Table($tableName)); if you want to rename the table, you have to make sure