本文整理匯總了PHP中Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableForeignKeysList方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractSchemaManager::_getPortableTableForeignKeysList方法的具體用法?PHP AbstractSchemaManager::_getPortableTableForeignKeysList怎麽用?PHP AbstractSchemaManager::_getPortableTableForeignKeysList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine\DBAL\Schema\AbstractSchemaManager
的用法示例。
在下文中一共展示了AbstractSchemaManager::_getPortableTableForeignKeysList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _getPortableTableForeignKeysList
/**
* {@inheritdoc}
*/
protected function _getPortableTableForeignKeysList($tableForeignKeys)
{
$foreignKeys = array();
foreach ($tableForeignKeys as $tableForeignKey) {
if (!isset($foreignKeys[$tableForeignKey['index_name']])) {
$foreignKeys[$tableForeignKey['index_name']] = array('local_columns' => array($tableForeignKey['local_column']), 'foreign_table' => $tableForeignKey['foreign_table'], 'foreign_columns' => array($tableForeignKey['foreign_column']), 'name' => $tableForeignKey['index_name'], 'options' => array('notnull' => $tableForeignKey['notnull'], 'match' => $tableForeignKey['match'], 'onUpdate' => $tableForeignKey['on_update'], 'onDelete' => $tableForeignKey['on_delete'], 'check_on_commit' => $tableForeignKey['check_on_commit'], 'clustered' => $tableForeignKey['clustered'], 'for_olap_workload' => $tableForeignKey['for_olap_workload']));
} else {
$foreignKeys[$tableForeignKey['index_name']]['local_columns'][] = $tableForeignKey['local_column'];
$foreignKeys[$tableForeignKey['index_name']]['foreign_columns'][] = $tableForeignKey['foreign_column'];
}
}
return parent::_getPortableTableForeignKeysList($foreignKeys);
}
示例2: _getPortableTableForeignKeysList
/**
* {@inheritdoc}
*/
protected function _getPortableTableForeignKeysList($tableForeignKeys)
{
$foreignKeys = array();
foreach ($tableForeignKeys as $tableForeignKey) {
if (!isset($foreignKeys[$tableForeignKey['ForeignKey']])) {
$foreignKeys[$tableForeignKey['ForeignKey']] = array('local_columns' => array($tableForeignKey['ColumnName']), 'foreign_table' => $tableForeignKey['ReferenceTableName'], 'foreign_columns' => array($tableForeignKey['ReferenceColumnName']), 'name' => $tableForeignKey['ForeignKey'], 'options' => array('onUpdate' => str_replace('_', ' ', $tableForeignKey['update_referential_action_desc']), 'onDelete' => str_replace('_', ' ', $tableForeignKey['delete_referential_action_desc'])));
} else {
$foreignKeys[$tableForeignKey['ForeignKey']]['local_columns'][] = $tableForeignKey['ColumnName'];
$foreignKeys[$tableForeignKey['ForeignKey']]['foreign_columns'][] = $tableForeignKey['ReferenceColumnName'];
}
}
return parent::_getPortableTableForeignKeysList($foreignKeys);
}
示例3: _getPortableTableForeignKeysList
/**
* {@inheritdoc}
*/
protected function _getPortableTableForeignKeysList($tableForeignKeys)
{
$foreignKeys = array();
foreach ($tableForeignKeys as $tableForeignKey) {
$tableForeignKey = array_change_key_case($tableForeignKey, \CASE_LOWER);
if (!isset($foreignKeys[$tableForeignKey['constraint_name']])) {
$foreignKeys[$tableForeignKey['constraint_name']] = array('local_columns' => array($tableForeignKey['local_column']), 'foreign_table' => $tableForeignKey['foreign_table'], 'foreign_columns' => array($tableForeignKey['foreign_column']), 'name' => $tableForeignKey['constraint_name'], 'options' => array('onUpdate' => $tableForeignKey['update_rule'], 'onDelete' => $tableForeignKey['delete_rule']));
} else {
$foreignKeys[$tableForeignKey['constraint_name']]['local_columns'][] = $tableForeignKey['local_column'];
$foreignKeys[$tableForeignKey['constraint_name']]['foreign_columns'][] = $tableForeignKey['foreign_column'];
}
}
return parent::_getPortableTableForeignKeysList($foreignKeys);
}