本文整理汇总了PHP中AppDelegationPeer::doSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP AppDelegationPeer::doSelect方法的具体用法?PHP AppDelegationPeer::doSelect怎么用?PHP AppDelegationPeer::doSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppDelegationPeer
的用法示例。
在下文中一共展示了AppDelegationPeer::doSelect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPreviousStep
public function getPreviousStep($sProUid = '', $sAppUid = '', $iDelIndex = 0, $iPosition = 0)
{
//Note: Depreciated, delete in the future
G::LoadClass('pmScript');
$oPMScript = new PMScript();
$oApplication = new Application();
//$aFields = $oApplication->load($sAppUid);
$oApplication = ApplicationPeer::retrieveByPk($sAppUid);
$aFields = $oApplication->toArray(BasePeer::TYPE_FIELDNAME);
if (!is_array($aFields['APP_DATA'])) {
$aFields['APP_DATA'] = G::array_merges(G::getSystemConstants(), unserialize($aFields['APP_DATA']));
}
$oPMScript->setFields($aFields['APP_DATA']);
try {
//get the current Delegation, and TaskUID
$c = new Criteria();
$c->add(AppDelegationPeer::PRO_UID, $sProUid);
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
$c->add(AppDelegationPeer::DEL_INDEX, $iDelIndex);
$aRow = AppDelegationPeer::doSelect($c);
$sTaskUid = $aRow[0]->getTasUid();
$iFirstStep = 1;
if ($iPosition == 10000) {
//get max step for this task
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn('MAX(' . StepPeer::STEP_POSITION . ')');
$c->add(StepPeer::PRO_UID, $sProUid);
$c->add(StepPeer::TAS_UID, $sTaskUid);
$rs = StepPeer::doSelectRS($c);
$rs->next();
$row = $rs->getRow();
$iPosition = intval($row[0]);
} else {
$iPosition -= 1;
}
$aPreviousStep = null;
if ($iPosition >= 1) {
while ($iPosition >= $iFirstStep) {
$bAccessStep = false;
//step
$oStep = new Step;
$oStep = $oStep->loadByProcessTaskPosition($sProUid, $sTaskUid, $iPosition);
if ($oStep) {
if (trim($oStep->getStepCondition()) !== '') {
$oPMScript->setScript($oStep->getStepCondition());
//.........这里部分代码省略.........
示例2: retrieveByPK
/**
* Retrieve object using using composite pkey values.
* @param string $app_uid
* @param int $del_index
* @param Connection $con
* @return AppDelegation
*/
public static function retrieveByPK($app_uid, $del_index, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria();
$criteria->add(AppDelegationPeer::APP_UID, $app_uid);
$criteria->add(AppDelegationPeer::DEL_INDEX, $del_index);
$v = AppDelegationPeer::doSelect($criteria, $con);
return !empty($v) ? $v[0] : null;
}