MediaWiki  REL1_22
ApiFormatTxt.php
Go to the documentation of this file.
00001 <?php
00031 class ApiFormatTxt extends ApiFormatBase {
00032 
00033     public function getMimeType() {
00034         // This looks like it should be text/plain, but IE7 is so
00035         // brain-damaged it tries to parse text/plain as HTML if it
00036         // contains HTML tags. Using MIME text/text works around this bug
00037         return 'text/text';
00038     }
00039 
00040     public function execute() {
00041         $this->printText( print_r( $this->getResultData(), true ) );
00042     }
00043 
00044     public function getDescription() {
00045         return 'Output data in PHP\'s print_r() format' . parent::getDescription();
00046     }
00047 }