本文整理匯總了PHP中testproject::setCurrentProject方法的典型用法代碼示例。如果您正苦於以下問題:PHP testproject::setCurrentProject方法的具體用法?PHP testproject::setCurrentProject怎麽用?PHP testproject::setCurrentProject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類testproject
的用法示例。
在下文中一共展示了testproject::setCurrentProject方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isset
$op['status_ok'] = isset($_GET[$key]);
if (!$op['status_ok']) {
$op['msg'] = lang_get($labelID);
break;
}
}
$anchor = isset($_GET['anchor']) ? $_GET['anchor'] : null;
$version = isset($_GET['version']) ? $_GET['version'] : null;
$tprojectPrefix = isset($_GET['tprojectPrefix']) ? $_GET['tprojectPrefix'] : null;
$item = isset($_GET['item']) ? $_GET['item'] : null;
$id = isset($_GET['id']) ? $_GET['id'] : null;
if ($op['status_ok']) {
$tproject = new testproject($db);
$tproject_data = $tproject->get_by_prefix($tprojectPrefix);
if ($op['status_ok'] = !is_null($tproject_data)) {
$tproject->setCurrentProject($tproject_data['id']);
$op['status_ok'] = isset($itemCode[$item]);
$op['msg'] = sprintf(lang_get('invalid_item'), $item);
} else {
$op['msg'] = sprintf(lang_get('testproject_not_found'), $tprojectPrefix);
}
}
if ($op['status_ok']) {
// Build name of function to call for doing the job.
$pfn = 'process_' . $item;
$jump_to = $pfn($db, $id, $tproject_data['id'], $tprojectPrefix, $version);
$op['status_ok'] = !is_null($jump_to['url']);
$op['msg'] = $jump_to['msg'];
}
if ($op['status_ok']) {
// add anchor to URL