本文整理汇总了PHP中VuFind\Search\Base\Results::performAndProcessSearch方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::performAndProcessSearch方法的具体用法?PHP Results::performAndProcessSearch怎么用?PHP Results::performAndProcessSearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VuFind\Search\Base\Results
的用法示例。
在下文中一共展示了Results::performAndProcessSearch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Called at the end of the Search Params objects' initFromRequest() method.
* This method is responsible for setting search parameters needed by the
* recommendation module and for reading any existing search parameters that may
* be needed.
*
* @param \VuFind\Search\Base\Params $params Search parameter object
* @param \Zend\StdLib\Parameters $request Parameter object representing user
* request.
*
* @return void
*/
public function init($params, $request)
{
// See if we can determine the label for the current search type; first
// check for an override in the GET parameters, then look at the incoming
// params object....
$typeLabel = $request->get('typeLabel');
$type = $request->get('type');
if (empty($typeLabel) && !empty($type)) {
$typeLabel = $params->getOptions()->getLabelForBasicHandler($type);
}
// Extract a search query:
$lookfor = $request->get($this->requestParam);
if (empty($lookfor) && is_object($params)) {
$lookfor = $params->getQuery()->getAllTerms();
}
// Set up the parameters:
$this->results = $this->resultsManager->get($this->getSearchClassId());
$params = $this->results->getParams();
$params->setLimit($this->limit);
$params->setBasicSearch($lookfor, $params->getOptions()->getHandlerForLabel($typeLabel));
// Perform the search:
$this->results->performAndProcessSearch();
}