mediawiki-extensions-Scribunto/includes/ScribuntoContent.php
Umherirrender 9231163147 Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: I28cb0daddf167e6e713b756e1f6ad0bbe98858ec
2024-10-20 11:54:11 +02:00

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 );
}
}