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


PHP Entity::getTableName方法代码示例

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


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

示例1: getEntityIdField

 private function getEntityIdField(Entity $entity)
 {
     return "moldp_" . $entity->getTableName() . "_" . $entity->getTableId()->getFieldName();
 }
开发者ID:euBatham,项目名称:moldP,代码行数:4,代码来源:ObjectMapper.class.php

示例2: createOrderBy

 public static function createOrderBy(Entity $entity, $entityField, $descend = false)
 {
     $tableName = "moldp_" . $entity->getTableName() . "_" . $entityField;
     $direction = $descend ? "DESC" : "ASC";
     return array("field" => $tableName, "direction" => $direction);
 }
开发者ID:euBatham,项目名称:moldP,代码行数:6,代码来源:Transformer.class.php

示例3: test_name

 public function test_name()
 {
     $entity = new Entity();
     $entity->setTableName('abc');
     test($entity->getTableName() == 'abc_entity');
 }
开发者ID:thruthesky,项目名称:backend,代码行数:6,代码来源:EntityTest.php

示例4: getEntityByLastValueOfTabela

 public static function getEntityByLastValueOfTabela(Entity $objeto)
 {
     $primaryKey = $objeto->getPrimaryKey();
     $tabela = $objeto->getTableName();
     $sql = "select * from {$tabela} order by {$primaryKey} desc limit 1";
     $rs = self::returnDescription($sql, $objeto);
     return $rs;
 }
开发者ID:EduardoAlvarez,项目名称:retrospective,代码行数:8,代码来源:dbManager.php

示例5: appendTableToEntityFields

 private function appendTableToEntityFields(Entity $entity)
 {
     $prefix = "moldp_" . $entity->getTableName();
     $entityFields = " {$prefix}." . $entity->getTableId()->getFieldName() . " AS " . $prefix . "_" . $entity->getTableId()->getFieldName() . ",";
     foreach ($entity->getEntityFields() as $key => $entityField) {
         if (!$entityField->isMappedEntity()) {
             $entityFields .= " {$prefix}." . $entityField->getColumnName() . " AS " . $prefix . "_" . $entityField->getColumnName() . ",";
         }
     }
     return rtrim($entityFields, ",");
 }
开发者ID:euBatham,项目名称:moldP,代码行数:11,代码来源:DatabaseHandlerSelectImpl.class.php


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