本文整理匯總了PHP中type::execute方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::execute方法的具體用法?PHP type::execute怎麽用?PHP type::execute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類type
的用法示例。
在下文中一共展示了type::execute方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: update
/**
*
* @param PMSEObservable $subject
* @return type
*/
public function update($subject)
{
if (method_exists($subject, 'getProcessDefinition')) {
$this->logger->debug("Trigger update of a Related Relationship for a Process Definitions update");
$processDefinition = $subject->getProcessDefinition();
$processDefinitionData = $processDefinition->fetched_row;
$fields = array('id', 'rel_element_type');
$relatedDependency = $this->getRelatedDependencyBean();
$this->sugarQuery->select($fields);
$this->sugarQuery->from($relatedDependency);
$this->sugarQuery->where()->queryAnd()->addRaw("pro_id='{$processDefinitionData['id']}' AND prj_id='{$processDefinitionData['prj_id']}' AND deleted=0");
$result = $this->sugarQuery->compileSql();
$this->logger->debug("Retrieve dependencies query: {$result}");
$rows = $this->sugarQuery->execute();
foreach ($rows as $row) {
$bean = $this->getRelatedDependencyBean($row['id']);
$bean->pro_status = $processDefinitionData['pro_status'];
$bean->pro_locked_variables = $processDefinitionData['pro_locked_variables'];
$bean->pro_terminate_variables = $processDefinitionData['pro_terminate_variables'];
if ($bean->pro_module !== $processDefinitionData['pro_module'] && $row['rel_element_type'] == 'TERMINATE') {
$bean->deleted = true;
}
$bean->save();
}
$this->processRelatedDependencies($processDefinitionData);
$depNumber = count($rows);
$this->logger->debug("Updating {$depNumber} dependencies");
}
return $result;
}
示例2: raw_query
/**
* SQL query in the traditional from
*
* @param type $query
* @param type $params
* @return type
*/
public function raw_query($query, $params = null)
{
if (!empty($query)) {
$this->prepared_query = $this->db->prepare($query);
$this->prepared_query->execute($params);
return $this->prepared_query;
} elseif ($this->mode == 'dev') {
throw new Exception('Empty query');
} else {
die;
}
}
示例3: execute
/**
* 執行方法(其中還會繼續調用另一execute),返回執行結果
* @param type $action
* @return boolean
*/
private function execute($action)
{
$result = $action->execute($this->registry);
//調用Action類中的execute方法
if (is_object($result)) {
$action = $result;
} elseif ($result === false) {
$action = $this->error;
$this->error = '';
} else {
$action = false;
}
return $action;
//實際就是$result 執行結果
}
示例4: validateReclaimCase
/**
* Method to validate whether a case been claimed
* @param $casID
* @param $casIndex
* @return object
*/
public function validateReclaimCase($casID, $casIndex)
{
//TODO Review functionality
$res = array();
//new stdClass();
$res['success'] = true;
$res['result'] = false;
//$caseBean = new BpmInbox();
$caseBean = $this->getInboxBean();
$this->sugarQueryObject->select(array('a.cas_id'));
$this->sugarQueryObject->from($caseBean, array('alias' => 'a'));
$this->sugarQueryObject->joinRaw("LEFT JOIN pmse_bpm_flow b ON (a.cas_id = b.cas_id)", array('alias' => 'b'));
$this->sugarQueryObject->where()->queryAnd()->addRaw("b.cas_id = {$casID} and a.cas_index = {$casIndex}");
$rows = $this->sugarQueryObject->execute();
$caseData = $rows[0];
$res['message'] = translate('LBL_PMSE_LABEL_ERROR_INVALIDCLAIM', 'pmse_Project');
if ($caseData['cas_start_date'] == '') {
$res['result'] = true;
}
return $res;
}
示例5: _ahaInterrupt
/**
* @brief 異步網絡IO中斷處理
* @param type $ahaAsyncIo
* @return boolean
*/
protected function _ahaInterrupt($ahaAsyncIo)
{
if ($ahaAsyncIo instanceof \Aha\Client\Http || $ahaAsyncIo instanceof \Aha\Client\Tcp || $ahaAsyncIo instanceof \Aha\Client\Udp || $ahaAsyncIo instanceof \Aha\Client\Multi) {
$ahaAsyncIo->loop(array($this, 'ahaClientCallback'));
return true;
} elseif ($ahaAsyncIo instanceof \Aha\Storage\Db\Coroutine || $ahaAsyncIo instanceof \Aha\Storage\Db\Transaction) {
$ahaAsyncIo->execute(array($this, 'ahaDbCallback'));
return true;
} elseif ($ahaAsyncIo instanceof \Aha\Storage\Memory\Coroutine) {
$ahaAsyncIo->execute(array($this, 'ahaRedisCallback'));
return true;
}
return false;
}
示例6: setArrayRequest
/**
*
*/
public function setArrayRequest()
{
$this->_request = $this->_handleRequest->execute();
}
示例7: run
/**
* Applique le pager à un template
*/
public function run(&$tpl)
{
global $pdo;
$this->sql->execute();
$this->sqlCount->execute();
$total = $this->sqlCount->fetch();
$total = $total[0];
if ($this->start < 0 || $this->start > $total) {
throw new Exception('Out of range');
}
$hasPrev = $this->start - $this->nbByPage >= 0;
$hasNext = $this->start + $this->nbByPage < $total;
$table = array('total' => $total, 'prev' => urldup(array($this->key => $hasPrev ? $this->start - $this->nbByPage : 0)), 'next' => urldup(array($this->key => $hasNext ? $this->start + $this->nbByPage : $this->start)), 'showNext' => $hasNext, 'showPrev' => $hasPrev, 'rows' => array());
while ($line = $this->sql->fetch()) {
$table['rows'][] = $line;
}
$tpl->assign($this->prepose . 'table', $table);
}