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


PHP Gateway::load方法代碼示例

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


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

示例1: getAllGateways

 /**
  * Get all gateways for any Process
  * @param string $sProUid
  * @return array
  */
 public function getAllGateways($sProUid)
 {
     try {
         $aGateways = array();
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(GatewayPeer::PRO_UID, $sProUid);
         $oDataset = GatewayPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oGateway = new Gateway();
             $aGateways[] = $oGateway->load($aRow['GAT_UID']);
             $oDataset->next();
         }
         return $aGateways;
     } catch (Exception $oError) {
         throw $oError;
     }
 }
開發者ID:nshong,項目名稱:processmaker,代碼行數:24,代碼來源:class.tasks.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;
     }
 }
開發者ID:rodrigoivan,項目名稱:processmaker,代碼行數:13,代碼來源:class.processMap.php

示例3: createTransitionsPM

 /**
  * This function create transitions from the array transitions for the new processmap
  * @param array $task
  * @param array $routes
  * @param array $events
  * @param array $countEvents
  * @param array $arrayRoutes
  * @param array $countRoutes
  * @return array
  */
 function createTransitionsPM($tasks, $routes, $events, $countEvents, $arrayRoutes, $countRoutes)
 {
     $cont = 0;
     $dataRoutes = '';
     $endEvent = 1;
     $taskParallel = '';
     $routeParallel = '';
     $taskSecJoin = '';
     $routeSecJoin = '';
     $taskDiscriminator = '';
     $taskEvaluate = '';
     $routeEvaluate = '';
     $taskParallelEv = '';
     $routeParallelEv = '';
     $taskSelect = '';
     $routeSelect = '';
     $routeEnd = '';
     $arraySecJoin = array();
     $position = 0;
     $fillColor = '';
     $transitions = '';
     $arrayGateways = array();
     $countG = 0;
     $gatPosX = 0;
     $gatPosY = 0;
     foreach ($routes as $key => $row) {
         if ($row['ROU_TYPE'] == 'SEC-JOIN') {
             $arraySecJoin[$position] = array();
             $arraySecJoin[$position] = $row;
             $position = $position + 1;
             unset($routes[$key]);
         }
     }
     $aux = $arraySecJoin;
     foreach ($arraySecJoin as $key => $row) {
         $aux[$key] = $row['ROU_NEXT_TASK'];
     }
     if (sizeof($arraySecJoin) > 0) {
         array_multisort($aux, SORT_ASC, $arraySecJoin);
         unset($aux);
     }
     foreach ($routes as $key => $row) {
         $uid[$key] = $row['TAS_UID'];
         $case[$key] = $row['ROU_CASE'];
     }
     if (sizeof($routes) > 0) {
         array_multisort($uid, SORT_ASC, $case, SORT_ASC, $routes);
     }
     $routes = array_merge($routes, $arraySecJoin);
     foreach ($routes as $key => $val) {
         $end = 0;
         $idRoute = $val['ROU_UID'];
         $idTask = $val['TAS_UID'];
         $nextTask = $val['ROU_NEXT_TASK'];
         $condition = htmlentities($val['ROU_CONDITION']);
         $toPort = $val['ROU_TO_PORT'];
         $fromPort = $val['ROU_FROM_PORT'];
         //If End Event
         if ($nextTask == "-1") {
             $end = 1;
         }
         $typeRoute = $val['ROU_TYPE'];
         $route = '';
         //Get GAT_UID from ROUTE table based on ROU_UID
         $oRoute = new Route();
         $aRouteDetails = $oRoute->load($idRoute);
         $sGateUID = $aRouteDetails['GAT_UID'];
         //Get Gateway details from above GAT_UID
         $oGateway = new Gateway();
         if ($sGateUID != '') {
             $aGatewayDetails = $oGateway->load($sGateUID);
             $gatPosX = $aGatewayDetails['GAT_X'];
             $gatPosY = $aGatewayDetails['GAT_Y'];
         }
         //if route is of SEQUENTIAL type,assign route id to GAT_UID
         if ($sGateUID == '') {
             $sGateUID = $idRoute;
         }
         if ($typeRoute != "SEQUENTIAL") {
             switch ($typeRoute) {
                 case 'PARALLEL':
                     $coordinateX = 0;
                     $coordinateY = 0;
                     foreach ($tasks as $taskVal => $idVal) {
                         if ($idVal['TAS_UID'] == $idTask) {
                             $coordinateX = $idVal['TAS_POSX'] + 60;
                             $coordinateY = $idVal['TAS_POSY'] + 60;
                             $tas_width = $idVal['TAS_WIDTH'];
                             $tas_height = $idVal['TAS_HEIGHT'];
                         }
//.........這裏部分代碼省略.........
開發者ID:nshong,項目名稱:processmaker,代碼行數:101,代碼來源:class.xpdl.php


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