MediaWiki
REL1_19
|
00001 <?php 00031 class ApiFormatDump extends ApiFormatBase { 00032 00033 public function __construct( $main, $format ) { 00034 parent::__construct( $main, $format ); 00035 } 00036 00037 public function getMimeType() { 00038 // This looks like it should be text/plain, but IE7 is so 00039 // brain-damaged it tries to parse text/plain as HTML if it 00040 // contains HTML tags. Using MIME text/text works around this bug 00041 return 'text/text'; 00042 } 00043 00044 public function execute() { 00045 ob_start(); 00046 var_dump( $this->getResultData() ); 00047 $result = ob_get_contents(); 00048 ob_end_clean(); 00049 $this->printText( $result ); 00050 } 00051 00052 public function getDescription() { 00053 return 'Output data in PHP\'s var_dump() format' . parent::getDescription(); 00054 } 00055 00056 public function getVersion() { 00057 return __CLASS__ . ': $Id$'; 00058 } 00059 }