MediaWiki master
WebInstallerDocument.php
Go to the documentation of this file.
1<?php
8namespace MediaWiki\Installer;
9
10abstract class WebInstallerDocument extends WebInstallerPage {
11
15 abstract protected function getFileName();
16
18 public function execute() {
19 $text = $this->getFileContents();
20 $text = InstallDocFormatter::format( $text );
21 $this->parent->output->addWikiTextAsInterface( $text );
22 $this->startForm();
23 $this->endForm( false );
24 return '';
25 }
26
30 public function getFileContents() {
31 $file = __DIR__ . '/../../' . $this->getFileName();
32 if ( !file_exists( $file ) ) {
33 return wfMessage( 'config-nofile', $file )->plain();
34 }
35
36 return file_get_contents( $file );
37 }
38
39}
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Abstract class to define pages for the web installer.
endForm( $continue='continue', $back='back')