本文整理匯總了PHP中thebuggenie\core\entities\Issue::findIssuesByText方法的典型用法代碼示例。如果您正苦於以下問題:PHP Issue::findIssuesByText方法的具體用法?PHP Issue::findIssuesByText怎麽用?PHP Issue::findIssuesByText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類thebuggenie\core\entities\Issue
的用法示例。
在下文中一共展示了Issue::findIssuesByText方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: runFindDuplicateIssue
public function runFindDuplicateIssue(framework\Request $request)
{
$status = 200;
$message = null;
if ($issue_id = $request['issue_id']) {
try {
$issue = entities\Issue::getB2DBTable()->selectById($issue_id);
} catch (\Exception $e) {
$status = 400;
$message = framework\Context::getI18n()->__('Could not find this issue');
}
} else {
$status = 400;
$message = framework\Context::getI18n()->__('Please provide an issue number');
}
$searchfor = $request['searchfor'];
if (mb_strlen(trim($searchfor)) < 3 && !is_numeric($searchfor)) {
$status = 400;
$message = framework\Context::getI18n()->__('Please enter something to search for (3 characters or more) %searchfor', array('searchfor' => $searchfor));
}
$this->getResponse()->setHttpStatus($status);
if ($status == 400) {
return $this->renderJSON(array('error' => $message));
}
list($issues, $count) = entities\Issue::findIssuesByText($searchfor, $this->selected_project);
return $this->renderJSON(array('content' => $this->getComponentHTML('main/findduplicateissues', array('issue' => $issue, 'issues' => $issues, 'count' => $count))));
}