MediaWiki master
WebInstallerDocument.php
Go to the documentation of this file.
1<?php
22namespace MediaWiki\Installer;
23
24abstract class WebInstallerDocument extends WebInstallerPage {
25
29 abstract protected function getFileName();
30
31 public function execute() {
32 $text = $this->getFileContents();
33 $text = InstallDocFormatter::format( $text );
34 $this->parent->output->addWikiTextAsInterface( $text );
35 $this->startForm();
36 $this->endForm( false );
37 return '';
38 }
39
43 public function getFileContents() {
44 $file = __DIR__ . '/../../' . $this->getFileName();
45 if ( !file_exists( $file ) ) {
46 return wfMessage( 'config-nofile', $file )->plain();
47 }
48
49 return file_get_contents( $file );
50 }
51
52}
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')