當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DaoFactory::SystemInfo方法代碼示例

本文整理匯總了PHP中DaoFactory::SystemInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP DaoFactory::SystemInfo方法的具體用法?PHP DaoFactory::SystemInfo怎麽用?PHP DaoFactory::SystemInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::SystemInfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: perform

 /**
  * PL/SQLのbatch_zaiko_allを実行する
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     try {
         $this->alterDao = DaoFactory::AlterSql();
         $this->alterDao->BeginTransaction();
         $app_name = $this->config->get('app_name');
         // 更新所有項目
         $this->AlterDB_21275();
         $this->ModifyData_21275();
         if ($app_name == 'AsOrder') {
             //AsOrderのみ
         } elseif ($app_name == 'AsCount') {
             //AsCountのみ
         } elseif ($app_name == 'AsZai') {
             //AsZaiのみ
         }
         $params = array('CURRENT_VERSION' => $this->config->get('code_version'), 'UID' => 'script', 'PGM' => 'batch');
         DaoFactory::SystemInfo()->Update($params);
         $this->alterDao->CommitTransaction();
     } catch (Exception $e) {
         $this->alterDao->AbortTransaction();
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:29,代碼來源:U026000.php

示例2: preforward

 function preforward()
 {
     $company_id = $this->config->get('company_id');
     $this->af->setApp('company_id', $company_id);
     $this->af->setApp('code_version', $this->config->get('code_version'));
     $this->af->setApp('db_version', DaoFactory::SystemInfo()->getSystemInfo());
     $this->af->setApp('get_company_id', $_GET['company_id']);
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:8,代碼來源:Login.php

示例3: perform

 /**
  * PL/SQLのbatch_zaiko_allを実行する
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     try {
         //1.先連接數據庫,獲得版本表中的數據庫版本信息
         try {
             $db_version = DaoFactory::SystemInfo()->Column('CURRENT_VERSION', false, array());
         } catch (Exception $e) {
             $db_version = '2.27.0';
         }
         $db_version_array = explode('.', $db_version);
         foreach ($db_version_array as &$temp) {
             if (strlen($temp) < 2) {
                 $temp = '0' . $temp;
             }
         }
         $db_version = implode($db_version_array);
         //test
         //         	echo $db_version . "\n";
         //         	echo "*****************\n";
         //test
         $arr_filenames = scandir(dirname(__FILE__));
         foreach ($arr_filenames as $key => $filename) {
             if ($filename == '.' || $filename == '..' || $filename == 'Update.php') {
                 unset($arr_filenames[$key]);
             }
         }
         //test
         // 			foreach ( $arr_filenames as $temp){
         // 				echo $temp . "\n";
         // 			}
         // 			echo "*****************\n";
         //test
         //2.讀取當前目錄下的以u開頭和d開頭的文件名字,分別存入數組後排序
         $update_array = array();
         $downback_array = array();
         foreach ($arr_filenames as $temp) {
             if (strtolower($temp[0]) == "u") {
                 $update_array[substr($temp, 1, -4)] = $temp;
             }
             //            		if ( strtolower( $temp[0] ) == "d" ){
             //            			$downback_array[substr( $temp, 1, -4 )] = $temp;
             //            		}
         }
         ksort($update_array);
         //            ksort( $downback_array );
         //test
         //            foreach ( $update_array as $temp){
         //            	echo $temp . "\n";
         //            	echo "*****************\n";
         //            }
         //test
         //3.用當前代碼版本與數據庫版本比較,決定要執行的文件,存入數組
         //test
         echo $this->config->get('code_version');
         //test
         $running_array = array();
         $code_version = $this->config->get('code_version');
         //add 0
         $code_version_array = explode('.', $code_version);
         foreach ($code_version_array as &$temp) {
             if (strlen($temp) < 2) {
                 $temp = '0' . $temp;
             }
         }
         $code_version = implode($code_version_array);
         if ($db_version < $code_version) {
             foreach ($update_array as $key => $temp) {
                 if ($key <= $db_version) {
                     continue;
                 } else {
                     if ($key > $code_version) {
                         break;
                     } else {
                         $running_array[] = $temp;
                     }
                 }
             }
         }
         //test
         //            file_put_contents( '/tmp/running',var_export( $running_array, true ) );
         //test
         //4.運行需要升級的文件
         foreach ($running_array as $temp) {
             $this->backend->getController()->trigger('batch_system_' . strtolower(substr($temp, 0, -4)), '', true);
         }
     } catch (Exception $e) {
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:94,代碼來源:Update.php


注:本文中的DaoFactory::SystemInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。