MediaWiki  master
SearchResult.php
Go to the documentation of this file.
1 <?php
38 class SearchResult {
41 
42  public function __construct() {
43  if ( self::class === static::class ) {
44  wfDeprecated( __METHOD__, '1.34' );
45  }
46  }
47 
55  public static function newFromTitle( $title, ISearchResultSet $parentSet = null ) {
56  $result = new RevisionSearchResult( $title );
57  if ( $parentSet ) {
58  $parentSet->augmentResult( $result );
59  }
60  return $result;
61  }
62 }
static newFromTitle( $title, ISearchResultSet $parentSet=null)
Return a new SearchResult and initializes it with a title.
SearchResult class based on the Revision information.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
trait RevisionSearchResultTrait
Transitional trait used to share the methods between SearchResult and RevisionSearchResult.
trait SearchResultTrait
Trait for SearchResult subclasses to share non-obvious behaviors or methods that rarely specialized...