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


PHP Results::performAndProcessSearch方法代码示例

本文整理汇总了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();
 }
开发者ID:tillk,项目名称:vufind,代码行数:35,代码来源:SearchObject.php


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