本文整理汇总了PHP中Process::processExists方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::processExists方法的具体用法?PHP Process::processExists怎么用?PHP Process::processExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::processExists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Process
}
}
//replacing the processOwner user for the current user
$oData->process['PRO_CREATE_USER'] = $_SESSION['USER_LOGGED'];
//!respect of the groups
if ($result->ExistProcessInDatabase == 0 && $result->ExistGroupsInDatabase == 0) {
if ($processFileType == "pm") {
$oProcess->createProcessFromData($oData, $path . $filename);
}
}
//!data ouput
$result->sNewProUid = $sProUid;
$result->proFileName = $Fields['PRO_FILENAME'];
//Add Audit Log
$process = new Process();
if ($process->processExists($sProUid)) {
$arrayProcessData = $process->load($oData->process["PRO_UID"]);
G::auditLog("ImportProcess", "PM File Imported " . $arrayProcessData["PRO_TITLE"] . " (" . $arrayProcessData["PRO_UID"] . ")");
}
} catch (Exception $e) {
$result->response = $e->getMessage();
$result->catchMessage = $e->getMessage();
$result->success = true;
}
}
if ($action == "uploadFileNewProcessExist") {
try {
$option = $_REQUEST["IMPORT_OPTION"];
$filename = $_REQUEST["PRO_FILENAME"];
$processFileType = $_REQUEST["processFileType"];
$result->ExistGroupsInDatabase = "";
示例2: updateProcessRow
/**
* Update a Process register in DB, if the process doesn't exist with the same
* uid of the $row['PRO_UID'] parameter the function creates a new one based
* on the $row parameter data.
*
* @param $row array parameter with the process data
* @return $oProcess Process object
*/
public function updateProcessRow ($row)
{
$oProcess = new Process();
if ($oProcess->processExists( $row['PRO_UID'] )) {
$oProcess->update( $row );
} else {
$oProcess->create( $row );
}
}
示例3: validateProUid
/**
* Validate Process Uid
* @var string $pro_uid. Uid for process
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @return string
*/
public function validateProUid($pro_uid)
{
$pro_uid = trim($pro_uid);
if ($pro_uid == '') {
throw new \Exception(\G::LoadTranslation("ID_PROJECT_NOT_EXIST", array('prj_uid', '')));
}
$oProcess = new \Process();
if (!$oProcess->processExists($pro_uid)) {
throw new \Exception(\G::LoadTranslation("ID_PROJECT_NOT_EXIST", array('prj_uid', $pro_uid)));
}
return $pro_uid;
}