public function getSection( $sectionId ) {
global $wgParser;
- $text = $this->getNativeData();
+ $text = $this->getText();
$sect = $wgParser->getSection( $text, $sectionId, false );
if ( $sect === false ) {
"section uses $sectionModelId." );
}
- $oldtext = $this->getNativeData();
- $text = $with->getNativeData();
+ $oldtext = $this->getText();
+ $text = $with->getText();
if ( strval( $sectionId ) === '' ) {
return $with; # XXX: copy first?
$text = wfMessage( 'newsectionheaderdefaultlevel' )
->rawParams( $header )->inContentLanguage()->text();
$text .= "\n\n";
- $text .= $this->getNativeData();
+ $text .= $this->getText();
return new static( $text );
}
public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) {
global $wgParser;
- $text = $this->getNativeData();
+ $text = $this->getText();
$pst = $wgParser->preSaveTransform( $text, $title, $user, $popts );
if ( $text === $pst ) {
public function preloadTransform( Title $title, ParserOptions $popts, $params = [] ) {
global $wgParser;
- $text = $this->getNativeData();
+ $text = $this->getText();
$plt = $wgParser->getPreloadText( $text, $title, $popts, $params );
return new static( $plt );
if ( $wgMaxRedirects < 1 ) {
// redirects are disabled, so quit early
- $this->redirectTargetAndText = [ null, $this->getNativeData() ];
+ $this->redirectTargetAndText = [ null, $this->getText() ];
return $this->redirectTargetAndText;
}
$redir = MediaWikiServices::getInstance()->getMagicWordFactory()->get( 'redirect' );
- $text = ltrim( $this->getNativeData() );
+ $text = ltrim( $this->getText() );
if ( $redir->matchStartAndRemove( $text ) ) {
// Extract the first link and see if it's usable
// Ensure that it really does come directly after #REDIRECT
$title = Title::newFromText( $m[1] );
// If the title is a redirect to bad special pages or is invalid, return null
if ( !$title instanceof Title || !$title->isValidRedirectTarget() ) {
- $this->redirectTargetAndText = [ null, $this->getNativeData() ];
+ $this->redirectTargetAndText = [ null, $this->getText() ];
return $this->redirectTargetAndText;
}
}
}
- $this->redirectTargetAndText = [ null, $this->getNativeData() ];
+ $this->redirectTargetAndText = [ null, $this->getText() ];
return $this->redirectTargetAndText;
}
# so the regex has to be fairly general
$newText = preg_replace( '/ \[ \[ [^\]]* \] \] /x',
'[[' . $target->getFullText() . ']]',
- $this->getNativeData(), 1 );
+ $this->getText(), 1 );
return new static( $newText );
}
* @see Content::matchMagicWord()
*/
public function matchMagicWord( MagicWord $word ) {
- return $word->match( $this->getNativeData() );
+ return $word->match( $this->getText() );
}
}