本文整理汇总了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();
}
示例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);
}
示例3: test_name
public function test_name()
{
$entity = new Entity();
$entity->setTableName('abc');
test($entity->getTableName() == 'abc_entity');
}
示例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;
}
示例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, ",");
}