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