本文整理汇总了PHP中Doctrine_Relation::getLocalColumnName方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Relation::getLocalColumnName方法的具体用法?PHP Doctrine_Relation::getLocalColumnName怎么用?PHP Doctrine_Relation::getLocalColumnName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_Relation
的用法示例。
在下文中一共展示了Doctrine_Relation::getLocalColumnName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildSimpleRelationSql
protected function buildSimpleRelationSql(Doctrine_Relation $relation, $foreignAlias, $localAlias, $overrideJoin, $join)
{
$queryPart = $join . $this->_conn->quoteIdentifier($relation->getTable()->getTableName()) . ' ' . $this->_conn->quoteIdentifier($foreignAlias);
if (!$overrideJoin) {
$queryPart .= ' ON ' . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocalColumnName()) . ' = ' . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeignColumnName());
}
return $queryPart;
}
示例2: generateUniqueRelationForeignKeyName
/**
* Get/generate a unique foreign key name for a relationship
*
* @param Doctrine_Relation $relation Relation object to generate the foreign key name for
* @return string $fkName
*/
public function generateUniqueRelationForeignKeyName(Doctrine_Relation $relation)
{
$parts = array($relation['localTable']->getTableName(), $relation->getLocalColumnName(), $relation['table']->getTableName(), $relation->getForeignColumnName());
$key = implode('_', array_merge($parts, array($relation['onDelete']), array($relation['onUpdate'])));
$format = $this->getAttribute(Doctrine_Core::ATTR_FKNAME_FORMAT);
return $this->_generateUniqueName('foreign_keys', $parts, $key, $format, $this->getAttribute(Doctrine_Core::ATTR_MAX_IDENTIFIER_LENGTH));
}
示例3: generateUniqueRelationForeignKeyName
/**
* Get/generate a unique foreign key name for a relationship
*
* @param Doctrine_Relation $relation Relation object to generate the foreign key name for
* @return string $fkName
*/
public function generateUniqueRelationForeignKeyName(Doctrine_Relation $relation)
{
$parts = array($relation['localTable']->getTableName(), $relation->getLocalColumnName(), $relation['table']->getTableName(), $relation->getForeignColumnName());
$key = implode('_', array_merge($parts, array($relation['onDelete']), array($relation['onUpdate'])));
$format = $this->getAttribute(Doctrine::ATTR_FKNAME_FORMAT);
return $this->_generateUniqueName('foreign_keys', $parts, $key, $format, $this->properties['max_identifier_length']);
}