当前位置: 首页>>代码示例>>PHP>>正文


PHP Column::getPeerName方法代码示例

本文整理汇总了PHP中Column::getPeerName方法的典型用法代码示例。如果您正苦于以下问题:PHP Column::getPeerName方法的具体用法?PHP Column::getPeerName怎么用?PHP Column::getPeerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Column的用法示例。


在下文中一共展示了Column::getPeerName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getColumnConstant

 /**
  * Get the column constant name (e.g. PeerName::COLUMN_NAME).
  *
  * @param      Column $col The column we need a name for.
  * @param      string $classname The Peer classname to use.
  *
  * @return     string If $classname is provided, then will return $classname::COLUMN_NAME; if not, then the peername is looked up for current table to yield $currTablePeer::COLUMN_NAME.
  */
 public function getColumnConstant($col, $classname = null)
 {
     if ($col === null) {
         $e = new Exception("No col specified.");
         print $e;
         throw $e;
     }
     if ($classname === null) {
         return $this->getBuildProperty('classPrefix') . $col->getConstantName();
     }
     // was it overridden in schema.xml ?
     if ($col->getPeerName()) {
         $const = strtoupper($col->getPeerName());
     } else {
         $const = strtoupper($col->getName());
     }
     return $classname . '::' . $const;
 }
开发者ID:vcgato29,项目名称:poff,代码行数:26,代码来源:OMBuilder.php

示例2: getColumnConstant

 /** 
  * Get the column constant name (e.g. PeerName::COLUMN_NAME).
  * 
  * @param Column $col The column we need a name for.
  * @param string $phpName The PHP Name of the peer class. The 'Peer' is appended automatically.
  * 
  * @return string If $phpName is provided, then will return {$phpName}Peer::COLUMN_NAME; if not, then uses current table COLUMN_NAME.
  */
 public function getColumnConstant($col, $phpName = null)
 {
     if ($col === null) {
         $e = new Exception("No col specified.");
         print $e;
         throw $e;
     }
     $classname = $this->getPeerClassname($phpName);
     // was it overridden in schema.xml ?
     if ($col->getPeerName()) {
         $const = strtoupper($col->getPeerName());
     } else {
         $const = strtoupper($col->getName());
     }
     return $classname . '::' . $const;
 }
开发者ID:DBezemer,项目名称:server,代码行数:24,代码来源:OMBuilder.php

示例3: getColumnName

 /**
  * COMPATIBILITY: Get the column constant name (e.g. PeerName::COLUMN_NAME).
  *
  * This method exists simply because it belonged to the 'PeerBuilder' that this
  * class is replacing (because of name conflict more than actual functionality overlap).
  * When the new builder model is finished this method will be removed.
  *
  * @param      Column $col The column we need a name for.
  * @param      string $phpName The PHP Name of the peer class. The 'Peer' is appended automatically.
  *
  * @return     string If $phpName is provided, then will return {$phpName}Peer::COLUMN_NAME; if not, just COLUMN_NAME.
  * @deprecated
  */
 public static function getColumnName(Column $col, $phpName = null)
 {
     // was it overridden in schema.xml ?
     if ($col->getPeerName()) {
         $const = strtoupper($col->getPeerName());
     } else {
         $const = strtoupper($col->getName());
     }
     if ($phpName !== null) {
         return $phpName . 'Peer::' . $const;
     } else {
         return $const;
     }
 }
开发者ID:sensorsix,项目名称:app,代码行数:27,代码来源:PeerBuilder.php


注:本文中的Column::getPeerName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。