mediawiki-extensions-Scribunto/includes/ScribuntoContent.php
Umherirrender 68aebf853c Use namespaced classes
This requires 1.42 for some new names

Done automatically via script

Change-Id: I6f6899981eab571cabb57534d7d98ce546a30a75
2024-01-05 19:24:06 +01:00

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