本文整理匯總了PHP中Gateway::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gateway::update方法的具體用法?PHP Gateway::update怎麽用?PHP Gateway::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gateway
的用法示例。
在下文中一共展示了Gateway::update方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: processMap
$aData = $_POST;
$aData['TASK'] = $oJSON->decode($_POST['TASK']);
$aData['ROU_NEXT_TASK'] = $oJSON->decode($_POST['ROU_NEXT_TASK']);
}
//Saving Gateway details into Gateway table
if ($aData['ROU_TYPE'] != 'SEQUENTIAL') {
$oProcessMap = new processMap();
//$sGatewayUID = $oProcessMap->saveNewGateway($aData['PROCESS'], $aData['TASK'][0], $aData['ROU_NEXT_TASK'][0]);
require_once 'classes/model/Gateway.php';
$oGateway = new Gateway();
$aGatewayFields = array();
$aGatewayFields['GAT_UID'] = $aData['GAT_UID'];
$aGatewayFields['TAS_UID'] = $aData['TASK'][0];
$aGatewayFields['GAT_NEXT_TASK'] = $aData['ROU_NEXT_TASK'][0];
$aGatewayFields['GAT_TYPE'] = '';
$oGateway->update($aGatewayFields);
//$sGatewayUID = $oProcessMap->saveNewGateway($aData['PROCESS'], $aData['TASK'][0], $aData['ROU_NEXT_TASK'][0]);
//echo $sGatewayUID.'|';
}
//else
// echo $aData['ROU_EVN_UID'].'|'; //sending route_event_uid in response
G::LoadClass('tasks');
$oTasks = new Tasks();
$rou_id = 0;
$aFields['GAT_UID'] = $aData['GAT_UID'];
switch ($aData['action']) {
case 'savePattern':
foreach ($aData['TASK'] as $iKey => $aRow) {
$oTasks->deleteAllRoutesOfTask($aData['PROCESS'], $aRow);
}
require_once 'classes/model/Route.php';
示例2: saveGatewayPosition
public function saveGatewayPosition($sGatewayUID = '', $iX = 0, $iY = 0)
{
try {
$oGateway = new Gateway();
$aFields = $oGateway->load($sGatewayUID);
$aFields['GAT_UID'] = $sGatewayUID;
$aFields['GAT_X'] = $iX;
$aFields['GAT_Y'] = $iY;
return $oGateway->update($aFields);
} catch (Exception $oError) {
throw $oError;
}
}