本文整理匯總了PHP中Gateway::gatewayExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gateway::gatewayExists方法的具體用法?PHP Gateway::gatewayExists怎麽用?PHP Gateway::gatewayExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gateway
的用法示例。
在下文中一共展示了Gateway::gatewayExists方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteGateway
public function deleteGateway($sProcessUID = '', $sGatewayUID = '')
{
try {
//First get all routes information related to $sGatewayUID
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('ROU_UID');
$oCriteria->add(RoutePeer::PRO_UID, $sProcessUID);
$oCriteria->add(RoutePeer::GAT_UID, $sGatewayUID);
$oDataset = RoutePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aRoutes[] = $aRow['ROU_UID'];
$oDataset->next();
}
$oGateway = new Gateway();
if ($oGateway->gatewayExists($sGatewayUID)) {
$oTasks = new Tasks();
$res = $oGateway->remove($sGatewayUID);
if ($res) {
$oRoute = new Route();
foreach ($aRoutes as $sRouteId) {
$oRoute->remove($sRouteId);
}
}
}
return;
} catch (Exception $oError) {
throw $oError;
}
}
示例2: createGatewayRows
/**
* creates row tasks from an Task Array
* @param string $aTasks
* @return array
*/
public function createGatewayRows($aGateway)
{
foreach ($aGateway as $key => $row) {
$oGateway = new Gateway();
if ($oGateway->gatewayExists($row['GAT_UID'])) {
$oGateway->remove($row['GAT_UID']);
}
if ($row['TAS_UID'] != '' && $row['GAT_NEXT_TASK'] != '') {
continue;
} else {
$res = $oGateway->createRow($row);
}
}
return;
}