85 if ( $setTitle &&
$text !==
'' &&
$text !==
null ) {
104 $this->suggestedTitle =
$title;
105 if ( $title !==
null ) {
167 return new self(
$score, $title->getPrefixedText(),
$title, $title->getArticleID() );
180 $suggestion->setSuggestedTitle( Title::makeTitle( 0,
$text ) );
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
string $text
the suggestion
string $url
the suggestion URL
static fromText( $score, $text)
Create suggestion from text Will also create a title if text if not empty.
int null $suggestedTitleID
NOTE: even if suggestedTitle is a redirect suggestedTitleID is the ID of the target page.
getSuggestedTitleID()
Title ID in the case this suggestion is based on a title.
setSuggestedTitle(Title $title=null)
Set the suggested title.
setText( $text, $setTitle=true)
Set the suggestion text.
setURL( $url)
Set the suggestion URL.
setSuggestedTitleID( $suggestedTitleID=null)
Set the suggested title ID.
getSuggestedTitle()
Title object in the case this suggestion is based on a title.
setScore( $score)
Set the suggestion score.
getURL()
Suggestion URL, can be the link to the Title or maybe in the future a link to the search results for ...
__construct( $score, $text=null, Title $suggestedTitle=null, $suggestedTitleID=null)
Construct a new suggestion.
Title null $suggestedTitle
the suggested title
float null $score
The suggestion score.
getScore()
Suggestion score.
getText()
The suggestion text.
static fromTitle( $score, Title $title)
Create suggestion from Title.
Represents a title within MediaWiki.
namespace and then decline to actually register it file or subcat img or subcat $title