30 private $suggestedTitle;
37 private $suggestedTitleID;
51 $suggestedTitleID =
null ) {
52 $this->score = $score;
54 if ( $suggestedTitle ) {
57 $this->suggestedTitleID = $suggestedTitleID;
73 public function setText( $text, $setTitle =
true ) {
75 if ( $setTitle && $text !==
'' && $text !==
null ) {
86 return $this->suggestedTitle;
93 $this->suggestedTitle = $title;
94 if ( $title !==
null ) {
96 $this->url = $urlUtils->expand( $title->getFullURL(),
PROTO_CURRENT ) ??
false;
106 return $this->suggestedTitleID;
113 $this->suggestedTitleID = $suggestedTitleID;
129 $this->score = $score;
167 $suggestion =
new self( $score, $text );
169 $suggestion->setSuggestedTitle( Title::newFromText( $text ) );
177class_alias( SearchSuggestion::class,
'SearchSuggestion' );