00001 <?php 00002 00003 /* 00004 * Created on Oct 22, 2006 00005 * 00006 * API for MediaWiki 1.8+ 00007 * 00008 * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License along 00021 * with this program; if not, write to the Free Software Foundation, Inc., 00022 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 * http://www.gnu.org/copyleft/gpl.html 00024 */ 00025 00026 if (!defined('MEDIAWIKI')) { 00027 // Eclipse helper - will be ignored in production 00028 require_once ('ApiFormatBase.php'); 00029 } 00030 00034 class ApiFormatPhp extends ApiFormatBase { 00035 00036 public function __construct($main, $format) { 00037 parent :: __construct($main, $format); 00038 } 00039 00040 public function getMimeType() { 00041 return 'application/vnd.php.serialized'; 00042 } 00043 00044 public function execute() { 00045 $this->printText(serialize($this->getResultData())); 00046 } 00047 00048 public function getDescription() { 00049 return 'Output data in serialized PHP format' . parent :: getDescription(); 00050 } 00051 00052 public function getVersion() { 00053 return __CLASS__ . ': $Id: ApiFormatPhp.php 35098 2008-05-20 17:13:28Z ialex $'; 00054 } 00055 }