Go to the documentation of this file.
85 if ( $setTitle &&
$text !==
'' &&
$text !==
null ) {
104 $this->suggestedTitle =
$title;
setSuggestedTitleID( $suggestedTitleID=null)
Set the suggested title ID.
setScore( $score)
Set the suggestion score.
float null $score
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 ...
string $url
the suggestion URL
__construct( $score, $text=null, Title $suggestedTitle=null, $suggestedTitleID=null)
Construct a new suggestion.
static fromTitle( $score, Title $title)
Create suggestion from Title.
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.
setURL( $url)
Set the suggestion URL.
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
setText( $text, $setTitle=true)
Set the suggestion text.
string $text
the suggestion
setSuggestedTitle(Title $title=null)
Set the suggested title.
Title null $suggestedTitle
the suggested title
getSuggestedTitle()
Title object in the case this suggestion is based on a title.
getText()
The suggestion text.
Represents a title within MediaWiki.
static fromText( $score, $text)
Create suggestion from text Will also create a title if text if not empty.
getScore()
Suggestion score.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.