| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace MediaWiki\Extension\Scribunto; |
| 13 |
|
| 14 |
use MediaWiki\Content\TextContent; |
| 15 |
use MediaWiki\Title\Title; |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
class ScribuntoContent extends TextContent { |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
public function __construct( $text ) { |
| 26 |
parent::__construct( $text, CONTENT_MODEL_SCRIBUNTO ); |
| 27 |
} |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
public function updateRedirect( Title $target ) { |
| 33 |
return Scribunto::newDefaultEngine()->updateRedirect( $this, $target ); |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public function getRedirectTarget() { |
| 40 |
return Scribunto::newDefaultEngine()->getRedirectTarget( $this ); |
| 41 |
} |
| 42 |
} |