Methods |
public
|
__construct(
string[] $localColumnNames,
Table|string $foreignTableName,
string[] $foreignColumnNames,
string|null $name = null,
mixed[] $options = [],
)
Initializes the foreign key constraint.
Initializes the foreign key constraint.
Parameters
$localColumnNames |
Names of the referencing table columns.
|
$foreignTableName |
Referenced table.
|
$foreignColumnNames |
Names of the referenced table columns.
|
$name |
Name of the foreign key constraint.
|
$options |
Options associated with the foreign key constraint.
|
|
#
|
public
|
getLocalTableName(): string
Returns the name of the referencing table
the foreign key constraint is associated with.
Returns the name of the referencing table
the foreign key constraint is associated with.
|
#
|
public
|
setLocalTable(Table $table): void
Sets the Table instance of the referencing table
the foreign key constraint is associated with.
Sets the Table instance of the referencing table
the foreign key constraint is associated with.
Parameters
$table |
Instance of the referencing table.
|
|
#
|
public
|
getLocalTable(): Table
|
#
|
public
|
getLocalColumns(): string[]
Returns the names of the referencing table columns
the foreign key constraint is associated with.
Returns the names of the referencing table columns
the foreign key constraint is associated with.
|
#
|
public
|
getQuotedLocalColumns(AbstractPlatform $platform): string[]
Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.
Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.
But only if they were defined with one or the referencing table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.
Parameters
$platform |
The platform to use for quotation.
|
|
#
|
public
|
getUnquotedLocalColumns(): string[]
Returns unquoted representation of local table column names for comparison with other FK
Returns unquoted representation of local table column names for comparison with other FK
|
#
|
public
|
getUnquotedForeignColumns(): string[]
Returns unquoted representation of foreign table column names for comparison with other FK
Returns unquoted representation of foreign table column names for comparison with other FK
|
#
|
public
|
getColumns()
{@inheritdoc}
|
#
|
public
|
getQuotedColumns(AbstractPlatform $platform): string[]
Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.
Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.
But only if they were defined with one or the referencing table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.
Parameters
$platform |
The platform to use for quotation.
|
Implements
|
#
|
public
|
getForeignTableName(): string
Returns the name of the referenced table
the foreign key constraint is associated with.
Returns the name of the referenced table
the foreign key constraint is associated with.
|
#
|
public
|
getUnqualifiedForeignTableName(): string
Returns the non-schema qualified foreign table name.
Returns the non-schema qualified foreign table name.
|
#
|
public
|
getQuotedForeignTableName(AbstractPlatform $platform): string
Returns the quoted representation of the referenced table name
the foreign key constraint is associated with.
Returns the quoted representation of the referenced table name
the foreign key constraint is associated with.
But only if it was defined with one or the referenced table name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.
Parameters
$platform |
The platform to use for quotation.
|
|
#
|
public
|
getForeignColumns(): string[]
Returns the names of the referenced table columns
the foreign key constraint is associated with.
Returns the names of the referenced table columns
the foreign key constraint is associated with.
|
#
|
public
|
getQuotedForeignColumns(AbstractPlatform $platform): string[]
Returns the quoted representation of the referenced table column names
the foreign key constraint is associated with.
Returns the quoted representation of the referenced table column names
the foreign key constraint is associated with.
But only if they were defined with one or the referenced table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.
Parameters
$platform |
The platform to use for quotation.
|
|
#
|
public
|
hasOption(string $name): bool
Returns whether or not a given option
is associated with the foreign key constraint.
Returns whether or not a given option
is associated with the foreign key constraint.
Parameters
$name |
Name of the option to check.
|
|
#
|
public
|
getOption(string $name): mixed
Returns an option associated with the foreign key constraint.
Returns an option associated with the foreign key constraint.
Parameters
$name |
Name of the option the foreign key constraint is associated with.
|
|
#
|
public
|
getOptions(): mixed[]
Returns the options associated with the foreign key constraint.
Returns the options associated with the foreign key constraint.
|
#
|
public
|
onUpdate(): string|null
Returns the referential action for UPDATE operations
on the referenced table the foreign key constraint is associated…
Returns the referential action for UPDATE operations
on the referenced table the foreign key constraint is associated with.
|
#
|
public
|
onDelete(): string|null
Returns the referential action for DELETE operations
on the referenced table the foreign key constraint is associated…
Returns the referential action for DELETE operations
on the referenced table the foreign key constraint is associated with.
|
#
|
public
|
intersectsIndexColumns(Index $index): bool
Checks whether this foreign key constraint intersects the given index columns.
Checks whether this foreign key constraint intersects the given index columns.
Returns true if at least one of this foreign key's local columns
matches one of the given index's columns, false otherwise.
Parameters
$index |
The index to be checked against.
|
|
#
|