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


PHP HTTPClient::SaveApplicationData方法代碼示例

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


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

示例1: setApplicationData

//  <!--type: string-->
$app_data->SoftwareVersion = 'v2.054';
//  <!--type: string-->
$app_data->SoftwareVersionDate = '2011-02-10';
// <!--type: string-->
$app_data->PTLSSocketId = trim(Settings::PTLSSocketId);
/*
 * Save Application Data
 *
 * Note:  Store the Application Profile Id after this step.  This will remain
 * static for your application unless you update your PTLS Socket Id.  This step
 * only needs to occur during first time application setup.
 *
 */
if ($_applicationProfileId == null) {
    $applicationData = setApplicationData($app_data);
    $response = $client->SaveApplicationData($applicationData);
    $_applicationProfileId = $response;
    // Print Application Data
    echo '<div style="text-align:center; border-width: thin; border-color: black; border-style:solid; "><h1>Application Data</h1></div>';
    echo '<ul><li>ApplicationProfileId:</b><font color="#800080"> ' . $_applicationProfileId . '</li></ul></font><br />';
}
function setApplicationData($appData)
{
    $applicationData = '<applicationData xmlns:i="http://www.w3.org/2001/XMLSchema-instance">' . '<ApplicationAttended>' . $appData->ApplicationAttended . '</ApplicationAttended>' . '<ApplicationLocation>' . $appData->ApplicationLocation . '</ApplicationLocation>' . '<ApplicationName>' . $appData->ApplicationName . '</ApplicationName>' . '<DeveloperId>' . $appData->DeveloperId . '</DeveloperId>' . '<HardwareType>' . $appData->HardwareType . '</HardwareType>' . '<PINCapability>' . $appData->PINCapability . '</PINCapability>' . '<PTLSSocketId>' . $appData->PTLSSocketId . '</PTLSSocketId>' . '<ReadCapability>' . $appData->ReadCapability . '</ReadCapability>' . '<SerialNumber>' . $appData->SerialNumber . '</SerialNumber>' . '<SoftwareVersion>' . $appData->SoftwareVersion . '</SoftwareVersion>' . '<SoftwareVersionDate>' . $appData->SoftwareVersionDate . '</SoftwareVersionDate>' . '<VendorId>' . $appData->VendorId . '</VendorId>' . '</applicationData>';
    return $applicationData;
}
?>


開發者ID:romackdnr,項目名稱:dnrpiggyments,代碼行數:28,代碼來源:SaveApplicationData.php


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