本文整理汇总了PHP中Process::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::getId方法的具体用法?PHP Process::getId怎么用?PHP Process::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::getId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addChildProcess
/**
* Ajouter un processus enfant.
* @param Process $proc Le processus a ajouter.
*/
public function addChildProcess(Process $proc)
{
$this->childs[] = $proc->getId();
}
示例2: array
$session['judge'] = array();
for ($i0 = 0; isset($r['0.1.' . $i0]); $i0++) {
$session['judge'][$i0] = @$r['0.1.' . $i0 . ''];
}
$case = array('id' => @$r['1'], 'area of law' => @$r['1.0']);
$case['type of case'] = array();
for ($i0 = 0; isset($r['1.1.' . $i0]); $i0++) {
$case['type of case'][$i0] = @$r['1.1.' . $i0 . ''];
}
$case['session'] = array();
for ($i0 = 0; isset($r['1.2.' . $i0]); $i0++) {
$case['session'][$i0] = @$r['1.2.' . $i0 . ''];
}
$Process = new Process($ID, $session, $case);
if ($Process->save() !== false) {
die('ok:' . $_SERVER['PHP_SELF'] . '?Process=' . urlencode($Process->getId()));
} else {
die('');
}
exit;
// do not show the interface
}
$buttons = "";
if (isset($_REQUEST['new'])) {
$new = true;
} else {
$new = false;
}
if (isset($_REQUEST['edit']) || $new) {
$edit = true;
} else {
示例3: min
/**
* Insert a new process.
* @param $processType integer one of the PROCESS_TYPE_* constants
* @param $maxParallelism integer the max. number
* of parallel processes allowed for the given
* process type.
* @return Process the new process instance, boolean
* false if there are too many parallel processes.
*/
function &insertObject($processType, $maxParallelism)
{
// Free processing slots occupied by zombie processes.
$this->deleteZombies();
// Cap the parallelism to the max. parallelism.
$maxParallelism = min($maxParallelism, PROCESS_MAX_PARALLELISM);
// Check whether we're allowed to spawn another process.
$currentParallelism = $this->getNumberOfObjectsByProcessType($processType);
if ($currentParallelism >= $maxParallelism) {
$falseVar = false;
return $falseVar;
}
// We create a process instance from the given data.
$process = new Process();
$process->setProcessType($processType);
// Generate a new process ID. See classdoc for process ID
// requirements.
$process->setId(uniqid('', true));
// Generate the timestamp.
$process->setTimeStarted(time());
// Persist the process.
$this->update(sprintf('INSERT INTO processes
(process_id, process_type, time_started, obliterated)
VALUES
(?, ?, ?, 0)'), array($process->getId(), (int) $process->getProcessType(), (int) $process->getTimeStarted()));
$process->setObliterated(false);
return $process;
}
示例4: addProcess
/**
* @param Process $process
* @return self
*/
public function addProcess(Process $process) : self
{
$this->processes[$process->getId()] = $process;
return $this;
}