本文整理匯總了PHP中BatchJob::getColumnsOldValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP BatchJob::getColumnsOldValue方法的具體用法?PHP BatchJob::getColumnsOldValue怎麽用?PHP BatchJob::getColumnsOldValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BatchJob
的用法示例。
在下文中一共展示了BatchJob::getColumnsOldValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: shouldCreateLockObject
public static function shouldCreateLockObject(BatchJob $batchJob, $isNew, PropelPDO $con = null)
{
if ($isNew) {
if (in_array($batchJob->getStatus(), self::getSchedulingRequiredStatusList())) {
return true;
}
return false;
}
$oldStatus = $batchJob->getColumnsOldValue(BatchJobPeer::STATUS);
$oldValueInClosed = is_null($oldStatus) ? false : in_array($oldStatus, BatchJobPeer::getClosedStatusList());
$newValue = $batchJob->getStatus();
$newValueInOpen = in_array($newValue, BatchJobPeer::getUnClosedStatusList());
// if the object is not a new object, a batch_job_lock object should exist.
// an exception is when we move from a closed state to a open open.
// f.i. retry request of an entry that was in closed status and we now restarted it.
if (!($oldValueInClosed && $newValueInOpen)) {
return false;
}
$lockEntry = BatchJobLockPeer::retrieveByPK($batchJob->getId());
if ($lockEntry === null) {
return true;
}
return false;
}