MediaWiki
REL1_22
|
00001 <?php 00031 class ApiFormatDump 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 ob_start(); 00042 var_dump( $this->getResultData() ); 00043 $result = ob_get_contents(); 00044 ob_end_clean(); 00045 $this->printText( $result ); 00046 } 00047 00048 public function getDescription() { 00049 return 'Output data in PHP\'s var_dump() format' . parent::getDescription(); 00050 } 00051 }