本文整理汇总了PHP中Doctrine\DBAL\Schema\ForeignKeyConstraint::getOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP ForeignKeyConstraint::getOptions方法的具体用法?PHP ForeignKeyConstraint::getOptions怎么用?PHP ForeignKeyConstraint::getOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine\DBAL\Schema\ForeignKeyConstraint
的用法示例。
在下文中一共展示了ForeignKeyConstraint::getOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createForeignKeyReplacement
/**
* Creates a foreign index replacement, which has quoted column names.
*
* @param ForeignKeyConstraint $fk
*
* @return ForeignKeyConstraint
*/
private function createForeignKeyReplacement(ForeignKeyConstraint $fk)
{
return new ForeignKeyConstraint($this->quoteIdentifiers($fk->getLocalColumns()), $this->platform->quoteIdentifier($fk->getForeignTableName()), $this->quoteIdentifiers($fk->getForeignColumns()), $this->platform->quoteIdentifier($fk->getName()), $fk->getOptions());
}
示例2: getForeignKeyDeclarationSQL
/**
* {@inheritDoc}
*/
public function getForeignKeyDeclarationSQL(ForeignKeyConstraint $foreignKey)
{
return parent::getForeignKeyDeclarationSQL(new ForeignKeyConstraint($foreignKey->getQuotedLocalColumns($this), str_replace('.', '__', $foreignKey->getQuotedForeignTableName($this)), $foreignKey->getQuotedForeignColumns($this), $foreignKey->getName(), $foreignKey->getOptions()));
}
示例3: acceptForeignKey
/**
* Accept a foreign key for a table
*
* @param Table $localTable a table object
* @param ForeignKeyConstraint $fkConstraint a constraint object
*
* @return void
*/
public function acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint)
{
if (!isset($this->schemaArray['tables'][$localTable->getName()]['constraint'])) {
$this->schemaArray['tables'][$localTable->getName()]['constraint'] = array();
}
$this->schemaArray['tables'][$localTable->getName()]['constraint'][] = array('name' => $fkConstraint->getName(), 'localcolumns' => $fkConstraint->getLocalColumns(), 'foreigntable' => $fkConstraint->getForeignTableName(), 'foreigncolumns' => $fkConstraint->getForeignColumns(), 'options' => $fkConstraint->getOptions());
}