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


PHP Process::update方法代碼示例

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


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

示例1: saveTitlePosition

 public function saveTitlePosition($sProcessUID = '', $iX = 0, $iY = 0)
 {
     try {
         $oProcess = new Process();
         $aFields = $oProcess->load($sProcessUID);
         $aFields['PRO_UID'] = $sProcessUID;
         $aFields['PRO_TITLE_X'] = $iX;
         $aFields['PRO_TITLE_Y'] = $iY;
         $oProcess->update($aFields);
         return true;
     } catch (Exception $oError) {
         throw $oError;
     }
 }
開發者ID:rodrigoivan,項目名稱:processmaker,代碼行數:14,代碼來源:class.processMap.php

示例2: disablePreviousProcesses

    /**

     * disable all previous process with the parent $sProUid

     *

     * @param $sProUid process uid

     * @return void

     */

    public function disablePreviousProcesses ($sProUid)

    {

        //change status of process

        $oCriteria = new Criteria( 'workflow' );

        $oCriteria->add( ProcessPeer::PRO_PARENT, $sProUid );

        $oDataset = ProcessPeer::doSelectRS( $oCriteria );

        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

        $oDataset->next();

        $oProcess = new Process();

        while ($aRow = $oDataset->getRow()) {

            $aRow['PRO_STATUS'] = 'DISABLED';

            $aRow['PRO_UPDATE_DATE'] = 'now';

            $oProcess->update( $aRow );

            $oDataset->next();

        }

    }
開發者ID:rrsc,項目名稱:processmaker,代碼行數:43,代碼來源:class.processes.php

示例3: rand

    //#28
    $t->isa_ok($e, 'Exception', 'update() returns error when PRO_UID is not defined');
    //#29
    //  $t->is ( $e->getMessage(),   "This row doesn't exist!",   "update() This row doesn't exist!" );
    $t->todo(" {$e->getMessage}() This row doesn't exist!  <>  The row '' in table Process doesn't exist! " . " line 171");
}
//update with $fields
$newTitle = 'new title ' . rand(1000, 5000);
$newDescription = 'new Description ' . rand(1000, 5000);
$Fields['PRO_UID'] = $proUid;
$Fields['PRO_TITLE'] = $newTitle;
$Fields['PRO_PARENT'] = rand(1000, 5000);
$Fields['PRO_CREATE_DATE'] = 'now';
try {
    $obj = new Process();
    $res = $obj->update($Fields);
    //#30
    $t->is($res, 1, "update() update 1 row");
    $Fields = $obj->Load($proUid);
    //#26
    $t->is($obj->getproUid(), $proUid, "update() APP_UID = " . $proUid);
    //#27
    $t->is($obj->getProTitle(), $newTitle, "update() getAppTitle");
    //#28
    $t->is($Fields['PRO_TITLE'], $newTitle, "update() PRO_TITLE= " . $newTitle);
    //#29
    $t->is($Fields['PRO_CREATE_DATE'], date('Y-m-d H:i:s'), "update() PRO_CREATE_DATE= " . date('Y-m-d H:i:s'));
} catch (Exception $e) {
    //#14
    $t->isa_ok($e, 'PropelException', 'update() return error ' . $e->getMessage());
    print $e->getMessage();
開發者ID:emildev35,項目名稱:processmaker,代碼行數:31,代碼來源:classProcessTest.php


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