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