示例#1
0
 public function invoke($arrInput)
 {
     try {
         $objDataService = new Service_Data_Testman();
         $strUrlHost = trim($arrInput["urlHost"]);
         $strProxyHost = $objDataService->replaceOnlineHost($strUrlHost);
         $arrRet = array("errno" => Navilib_CommonError::SUCCESS, "data" => array("urlHost" => $strUrlHost, "appName" => trim($arrInput["appName"]), "proxyHost" => $strProxyHost));
         return Navilib_Utils::result($arrRet["errno"], $arrRet["data"]);
     } catch (Exception $e) {
         Bd_Log::warning($e->getMessage(), $e->getCode());
         return Navilib_Utils::result($e->getCode(), array());
     }
 }
示例#2
0
 public function invoke($arrInput)
 {
     try {
         $strSignCode = $arrInput["signCodeForCreateSign"];
         $objDataService = new Service_Data_Testman();
         $strSign = $objDataService->createSign($strSignCode, $_POST, $_FILES);
         //开始生成签名
         $arrRet = array("errno" => Navilib_CommonError::SUCCESS, "data" => $strSign);
         return Navilib_Utils::result($arrRet["errno"], $arrRet["data"]);
     } catch (Exception $e) {
         Bd_Log::warning($e->getMessage(), $e->getCode());
         return Navilib_Utils::result($e->getCode(), array());
     }
 }
示例#3
0
 public function invoke($arrInput)
 {
     try {
         $strUrlKeyWord = $arrInput["urlKeyWord"];
         $intOffset = intval($arrInput["offset"]);
         $intLimit = intval($arrInput["limit"]);
         $objDataService = new Service_Data_Testman();
         $arrRet = $objDataService->getRecode(CURRENT_USER, $strUrlKeyWord, $intOffset, $intLimit);
         return Navilib_Utils::result($arrRet["errno"], $arrRet['data']);
     } catch (Exception $e) {
         Bd_Log::warning($e->getMessage(), $e->getCode());
         return Navilib_Utils::result($e->getCode(), array());
     }
 }
示例#4
0
 public function invoke($arrInput)
 {
     try {
         $strUrlHost = $arrInput["urlHostForCurlProxy"];
         $strAppName = $arrInput["appNameForCurlProxy"];
         $strActionInfo = $arrInput["actionInfoForCurlProxy"];
         $strCallType = $arrInput["callTypeForCurlProxy"];
         $arrParamType = json_decode($arrInput["paramTypeForCurlProxy"]);
         $arrUrlParam = array();
         //解析出待发起请求的所有参数
         foreach ($arrParamType as $strParamName => $strType) {
             $arrUrlParam[$strParamName]["type"] = $strType;
             if ("file" !== $strType) {
                 $arrUrlParam[$strParamName]["value"] = $_POST[$strParamName];
             } else {
                 $arrUrlParam[$strParamName]["value"] = "";
             }
         }
         /*foreach ($_POST as $strKey => $strVal) {
         		if($strKey !== 'urlHostForCurlProxy' &&
         			$strKey !== 'appNameForCurlProxy' &&
         			$strKey !== 'actionInfoForCurlProxy' &&
         			$strKey !== 'callTypeForCurlProxy' &&
         			$strKey !== 'paramTypeForCurlProxy' &&
         			$strKey !== 'signCodeForCreateSign') {
             		$arrUrlParam[$strKey] = $strVal;
         		}
             }
             foreach ($_FILES as $strKey => $arrItem) {
             	$arrUrlParam[$strKey] = '@upload_file';
             }*/
         //没有对应的用户,直接退出
         if (strlen(CURRENT_USER) <= 0) {
             Bd_Log::warning("username is null");
             return Navilib_Utils::result(Navilib_CommonError::USER_NOT_LOGIN, array());
         }
         $objDataService = new Service_Data_Testman();
         $arrRet = $objDataService->addRecode(CURRENT_USER, $strUrlHost, $strAppName, $strActionInfo, $strCallType, $arrUrlParam);
         return Navilib_Utils::result($arrRet["errno"], array());
     } catch (Exception $e) {
         Bd_Log::warning($e->getMessage(), $e->getCode());
         return Navilib_Utils::result($e->getCode(), array());
     }
 }
示例#5
0
 public function invoke($arrInput)
 {
     try {
         $arrRet["errno"] = Navilib_CommonError::SUCCESS;
         //获取历史记录
         $objDataService = new Service_Data_Testman();
         $arrRecode = $objDataService->getRecode(CURRENT_USER, "", 0, 50);
         $arrRet['data'] = $arrRecode['data'];
         //常用域名:0表示线下域名,1表示线上域名
         $arrRet["data"]["freqDomain"] = $objDataService->getFreqDomain();
         ksort($arrRet["data"]["freqDomain"]);
         //常用模块
         $arrRet["data"]["freqModule"] = array("ucenter");
         sort($arrRet["data"]["freqModule"]);
         return Navilib_Utils::result($arrRet["errno"], $arrRet["data"]);
     } catch (Exception $e) {
         Bd_Log::warning($e->getMessage(), $e->getCode());
         return Navilib_Utils::result($e->getCode(), array());
     }
 }