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