mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-04 04:38:08 +00:00
68aebf853c
This requires 1.42 for some new names Done automatically via script Change-Id: I6f6899981eab571cabb57534d7d98ce546a30a75
43 lines
771 B
PHP
43 lines
771 B
PHP
<?php
|
|
/**
|
|
* Scribunto Content Model
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @ingroup Scribunto
|
|
*
|
|
* @author Brad Jorsch <bjorsch@wikimedia.org>
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\Scribunto;
|
|
|
|
use MediaWiki\Title\Title;
|
|
use TextContent;
|
|
|
|
/**
|
|
* Represents the content of a Scribunto script page
|
|
*/
|
|
class ScribuntoContent extends TextContent {
|
|
|
|
/**
|
|
* @param string $text
|
|
*/
|
|
public function __construct( $text ) {
|
|
parent::__construct( $text, CONTENT_MODEL_SCRIBUNTO );
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function updateRedirect( Title $target ) {
|
|
return Scribunto::newDefaultEngine()->updateRedirect( $this, $target );
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getRedirectTarget() {
|
|
return Scribunto::newDefaultEngine()->getRedirectTarget( $this );
|
|
}
|
|
}
|