当前位置: 首页>>代码示例>>PHP>>正文


PHP Process::getId方法代码示例

本文整理汇总了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();
 }
开发者ID:Tiger66639,项目名称:symbiose-raspberrypi,代码行数:8,代码来源:Process.class.php

示例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 {
开发者ID:sapray,项目名称:ampersand-models,代码行数:31,代码来源:Process.php

示例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;
    }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:37,代码来源:ProcessDAO.inc.php

示例4: addProcess

 /**
  * @param Process $process
  * @return self
  */
 public function addProcess(Process $process) : self
 {
     $this->processes[$process->getId()] = $process;
     return $this;
 }
开发者ID:sgc-fireball,项目名称:libphp,代码行数:9,代码来源:ProcessList.php


注:本文中的Process::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。