mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-12-22 12:52:52 +00:00
9231163147
Changes to the use statements done automatically via script Change-Id: I28cb0daddf167e6e713b756e1f6ad0bbe98858ec
43 lines
789 B
PHP
43 lines
789 B
PHP
<?php
|
|
/**
|
|
* Scribunto Content Model
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @ingroup Scribunto
|
|
*
|
|
* @author Brad Jorsch <bjorsch@wikimedia.org>
|
|
*/
|
|
|
|
namespace MediaWiki\Extension\Scribunto;
|
|
|
|
use MediaWiki\Content\TextContent;
|
|
use MediaWiki\Title\Title;
|
|
|
|
/**
|
|
* 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 );
|
|
}
|
|
}
|