本文整理汇总了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;
}