class ForeignKeyConstraint extends AbstractAsset implements Constraint (View source)

Properties

protected string $_name from AbstractAsset
protected string $_namespace Namespace of the asset. If none isset the default namespace is assumed. from AbstractAsset
protected bool $_quoted from AbstractAsset
protected Table $_localTable
protected array $_localColumnNames
protected string $_foreignTableName
protected array $_foreignColumnNames
protected string $_cascade
protected array $_options

Methods

_setName(string $name)

Set name of this asset

bool
isInDefaultNamespace(string $defaultNamespaceName)

Is this asset in the default namespace?

string
getNamespaceName()

Get namespace name of this asset.

string
getShortestName(string $defaultNamespaceName)

The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.

string
getFullQualifiedName($defaultNamespaceName)

The normalized name is full-qualified and lowerspaced. Lowerspacing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.

bool
isQuoted()

Check if this asset's name is quoted

bool
isIdentifierQuoted(string $identifier)

Check if this identifier is quoted.

string
trimQuotes(string $identifier)

Trim quotes from the identifier.

string
getName()

Return name of this schema asset.

string
getQuotedName(AbstractPlatform $platform)

Get the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.

string
_generateIdentifierName(array $columnNames, string $prefix = '', int $maxSize = 30)

Generate an identifier from a list of column names obeying a certain string length.

__construct(array $localColumnNames, $foreignTableName, array $foreignColumnNames, $name = null, array $options = array())

No description

string
getLocalTableName()

No description

setLocalTable(Table $table)

No description

array
getLocalColumns()

No description

getColumns()

No description

string
getForeignTableName()

No description

string
getUnqualifiedForeignTableName()

Return the non-schema qualified foreign table name.

string
getQuotedForeignTableName(AbstractPlatform $platform)

Get the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.

array
getForeignColumns()

No description

hasOption($name)

No description

getOption($name)

No description

array
getOptions()

Gets the options associated with this constraint

string|null
onUpdate()

Foreign Key onUpdate status

string|null
onDelete()

Foreign Key onDelete status

Details

protected _setName(string $name)

Set name of this asset

Parameters

string $name

bool isInDefaultNamespace(string $defaultNamespaceName)

Is this asset in the default namespace?

Parameters

string $defaultNamespaceName

Return Value

bool

string getNamespaceName()

Get namespace name of this asset.

If NULL is returned this means the default namespace is used.

Return Value

string

string getShortestName(string $defaultNamespaceName)

The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.

Parameters

string $defaultNamespaceName

Return Value

string

string getFullQualifiedName($defaultNamespaceName)

The normalized name is full-qualified and lowerspaced. Lowerspacing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace name which is passed as argument to this method.

Parameters

$defaultNamespaceName

Return Value

string

bool isQuoted()

Check if this asset's name is quoted

Return Value

bool

protected bool isIdentifierQuoted(string $identifier)

Check if this identifier is quoted.

Parameters

string $identifier

Return Value

bool

protected string trimQuotes(string $identifier)

Trim quotes from the identifier.

Parameters

string $identifier

Return Value

string

string getName()

Return name of this schema asset.

Return Value

string

string getQuotedName(AbstractPlatform $platform)

Get the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.

Parameters

AbstractPlatform $platform

Return Value

string

protected string _generateIdentifierName(array $columnNames, string $prefix = '', int $maxSize = 30)

Generate an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, however building idents automatically for foreign keys, composite keys or such can easily create very long names.

Parameters

array $columnNames
string $prefix
int $maxSize

Return Value

string

__construct(array $localColumnNames, $foreignTableName, array $foreignColumnNames, $name = null, array $options = array())

Parameters

array $localColumnNames
$foreignTableName
array $foreignColumnNames
$name
array $options

string getLocalTableName()

Return Value

string

setLocalTable(Table $table)

Parameters

Table $table

array getLocalColumns()

Return Value

array

getColumns()

string getForeignTableName()

Return Value

string

string getUnqualifiedForeignTableName()

Return the non-schema qualified foreign table name.

Return Value

string

string getQuotedForeignTableName(AbstractPlatform $platform)

Get the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.

Parameters

AbstractPlatform $platform

Return Value

string

array getForeignColumns()

Return Value

array

hasOption($name)

Parameters

$name

getOption($name)

Parameters

$name

array getOptions()

Gets the options associated with this constraint

Return Value

array

string|null onUpdate()

Foreign Key onUpdate status

Return Value

string|null

string|null onDelete()

Foreign Key onDelete status

Return Value

string|null