本文整理匯總了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;
}
}
示例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();
}
}
示例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();