Debian Codegraph @

extensions/Scribunto/includes/ScribuntoContent.php

raw symbols SCIP
1 <?php
2 /**
3 * Scribunto Content Model
4 *
5 * @file
6 * @ingroup Extensions
7 * @ingroup Scribunto
8 *
9 * @author Brad Jorsch <[email protected]>
10 */
11
12 namespace MediaWiki\Extension\Scribunto;
13
14 use MediaWiki\Content\TextContent;
15 use MediaWiki\Title\Title;
16
17 /**
18 * Represents the content of a Scribunto script page
19 */
20 class ScribuntoContent extends TextContent {
21
22 /**
23 * @param string $text
24 */
25 public function __construct( $text ) {
26 parent::__construct( $text, CONTENT_MODEL_SCRIBUNTO );
27 }
28
29 /**
30 * @inheritDoc
31 */
32 public function updateRedirect( Title $target ) {
33 return Scribunto::newDefaultEngine()->updateRedirect( $this, $target );
34 }
35
36 /**
37 * @inheritDoc
38 */
39 public function getRedirectTarget() {
40 return Scribunto::newDefaultEngine()->getRedirectTarget( $this );
41 }
42 }