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


PHP Network::getTableName方法代码示例

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


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

示例1: loadFormSetting

 public function loadFormSetting(Request $request)
 {
     $data = $request->all();
     $result = array();
     $value = $data['value'];
     $task_id = isset($data['task_id']) ? $data['task_id'] : 0;
     switch ($value) {
         case 'ALLOC_CHECK':
         case 'ALLOC_RUN':
             $network = Network::getTableName();
             $allocJob = AllocJob::getTableName();
             $tm = [];
             $tm = DB::table($network . ' AS a')->join($allocJob . ' AS b', 'a.ID', '=', 'b.NETWORK_ID')->distinct()->get(['a.ID', 'a.NAME']);
             $alloc_job = AllocJob::where(['NETWORK_ID' => $tm[0]->ID])->get(['ID', 'NAME']);
             $result['network'] = $tm;
             $result['allocJob'] = $alloc_job;
             break;
         case 'VIS_REPORT':
             $result = Facility::all(['ID', 'NAME']);
             break;
         case 'FDC_EU':
             $models = ['Facility', 'EnergyUnitGroup', 'CodeReadingFrequency', 'CodeFlowPhase', 'CodeEventType', 'CodeAllocType', 'CodePlanType', 'CodeForecastType'];
             foreach ($models as $m) {
                 $tm = [];
                 $model = 'App\\Models\\' . $m;
                 $tm = $model::all(['ID', 'NAME']);
                 $result[$m] = $tm;
             }
             break;
         case 'FDC_FLOW':
             $models = ['Facility', 'CodeReadingFrequency', 'CodeFlowPhase'];
             foreach ($models as $m) {
                 $tm = [];
                 $model = 'App\\Models\\' . $m;
                 $tm = $model::all(['ID', 'NAME']);
                 $result[$m] = $tm;
             }
             break;
         case 'INT_IMPORT_DATA':
             $tm = [];
             $tm = IntConnection::all(['ID', 'NAME']);
             $intTagSet = IntTagSet::where(['CONNECTION_ID' => $tm[0]->ID])->get(['ID', 'NAME']);
             $result['IntConnection'] = $tm;
             $result['IntTagSet'] = $intTagSet;
             break;
         default:
             $result = [];
     }
     $task = TmWorkflowTask::where(['ID' => $task_id])->get();
     $result['task'] = $task;
     $result['value'] = $value;
     return response()->json(array('result' => $result));
 }
开发者ID:hunglmtb,项目名称:eb,代码行数:53,代码来源:DVController.php

示例2: getLoadSql

    public static function getLoadSql()
    {
        $tableName = Network::getTableName();
        return '
			SELECT
				`' . $tableName . '`.*
			FROM
				`' . Network::getDbName() . '`.`' . $tableName . '`
		';
    }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:10,代码来源:Network_Generated.class.php


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