本文整理汇总了PHP中VuFind\Search\Base\Results::getSearchId方法的典型用法代码示例。如果您正苦于以下问题:PHP Results::getSearchId方法的具体用法?PHP Results::getSearchId怎么用?PHP Results::getSearchId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VuFind\Search\Base\Results
的用法示例。
在下文中一共展示了Results::getSearchId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialize this result set scroller. This should only be called
* prior to displaying the results of a new search.
*
* @param \VuFind\Search\Base\Results $searchObject The search object that was
* used to execute the last search.
*
* @return bool
*/
public function init($searchObject)
{
// Do nothing if disabled:
if (!$this->enabled) {
return false;
}
// Save the details of this search in the session
$this->data->searchId = $searchObject->getSearchId();
$this->data->page = $searchObject->getParams()->getPage();
$this->data->limit = $searchObject->getParams()->getLimit();
$this->data->total = $searchObject->getResultTotal();
// save the IDs of records on the current page to the session
// so we can "slide" from one record to the next/previous records
// spanning 2 consecutive pages
$this->data->currIds = $this->fetchPage($searchObject);
// clear the previous/next page
unset($this->data->prevIds);
unset($this->data->nextIds);
return (bool) $this->data->currIds;
}