Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
ScribuntoContent
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 updateRedirect
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getRedirectTarget
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 * Scribunto Content Model
4 *
5 * @file
6 * @ingroup Extensions
7 * @ingroup Scribunto
8 *
9 * @author Brad Jorsch <bjorsch@wikimedia.org>
10 */
11
12namespace MediaWiki\Extension\Scribunto;
13
14use MediaWiki\Title\Title;
15use TextContent;
16
17/**
18 * Represents the content of a Scribunto script page
19 */
20class 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}