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


PHP SearchResult::newFromTitle方法代码示例

本文整理汇总了PHP中SearchResult::newFromTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchResult::newFromTitle方法的具体用法?PHP SearchResult::newFromTitle怎么用?PHP SearchResult::newFromTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchResult的用法示例。


在下文中一共展示了SearchResult::newFromTitle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: next

 public function next()
 {
     if ($this->fetched || !$this->result) {
         return false;
     }
     $this->fetched = true;
     return SearchResult::newFromTitle($this->result);
 }
开发者ID:Kaph-Noir,项目名称:mediawiki,代码行数:8,代码来源:SearchNearMatchResultSet.php

示例2: next

 function next()
 {
     if ($this->resultSet === false) {
         return false;
     }
     $row = $this->resultSet->fetchObject();
     if ($row === false) {
         return false;
     }
     return SearchResult::newFromTitle(Title::makeTitle($row->page_namespace, $row->page_title), $this);
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:11,代码来源:SqlSearchResultSet.php

示例3: provideRewriteQueryWithSuggestion

 public function provideRewriteQueryWithSuggestion()
 {
     return array(array('With suggestion and no rewritten query shows did you mean', '/Did you mean: <a[^>]+>first suggestion/', new SpecialSearchTestMockResultSet('first suggestion', null, array(SearchResult::newFromTitle(Title::newMainPage())))), array('With rewritten query informs user of change', '/Showing results for <a[^>]+>first suggestion/', new SpecialSearchTestMockResultSet('asdf', 'first suggestion', array(SearchResult::newFromTitle(Title::newMainPage())))), array('When both queries have no results user gets no results', '/There were no results matching the query/', new SpecialSearchTestMockResultSet('first suggestion', 'first suggestion', array())));
 }
开发者ID:mb720,项目名称:mediawiki,代码行数:4,代码来源:SpecialSearchTest.php

示例4: provideRewriteQueryWithSuggestion

 public function provideRewriteQueryWithSuggestion()
 {
     return array(array('With results and a suggestion does not run suggested query', '/Did you mean: <a[^>]+>first suggestion/', array(new SpecialSearchTestMockResultSet('first suggestion', array(SearchResult::newFromTitle(Title::newMainPage()))), new SpecialSearchTestMockResultSet('was never run', array()))), array('With no results and a suggestion responds with suggested query results', '/Showing results for <a[^>]+>first suggestion/', array(new SpecialSearchTestMockResultSet('first suggestion', array()), new SpecialSearchTestMockResultSet('second suggestion', array(SearchResult::newFromTitle(Title::newMainPage()))))), array('When both queries have no results user gets no results', '/There were no results matching the query/', array(new SpecialSearchTestMockResultSet('first suggestion', array()), new SpecialSearchTestMockResultSet('second suggestion', array()))));
 }
开发者ID:ucfengzhun,项目名称:mediawiki,代码行数:4,代码来源:SpecialSearchTest.php


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