當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。