X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFormatYaml.php;h=5397bd4dcc5a1cf5f20763ddad511ac2b0c36f88;hb=59e656c23bec9e439cbf4d15f654009282642646;hp=8b74b0654ad34225a0b11fc127d624f5f2890375;hpb=f97b323e003ff8007bff05f30156f38bc1a93b5a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFormatYaml.php b/includes/api/ApiFormatYaml.php index 8b74b0654a..5397bd4dcc 100644 --- a/includes/api/ApiFormatYaml.php +++ b/includes/api/ApiFormatYaml.php @@ -1,12 +1,11 @@ + * Copyright (C) 2006 Yuri Astrakhan @gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,15 +23,18 @@ * http://www.gnu.org/copyleft/gpl.html */ -if (!defined('MEDIAWIKI')) { +if ( !defined( 'MEDIAWIKI' ) ) { // Eclipse helper - will be ignored in production - require_once ('ApiFormatBase.php'); + require_once ( 'ApiFormatBase.php' ); } +/** + * @ingroup API + */ class ApiFormatYaml extends ApiFormatBase { - public function __construct($main, $format) { - parent :: __construct($main, $format); + public function __construct( $main, $format ) { + parent :: __construct( $main, $format ); } public function getMimeType() { @@ -40,12 +42,14 @@ class ApiFormatYaml extends ApiFormatBase { } public function execute() { - require ('ApiFormatYaml_spyc.php'); - $this->printText(Spyc :: YAMLDump($this->getResult()->getData())); + $this->printText( Spyc :: YAMLDump( $this->getResultData() ) ); + } + + public function getDescription() { + return 'Output data in YAML format' . parent :: getDescription(); } - protected function getDescription() { - return 'Output data in YAML format'; + public function getVersion() { + return __CLASS__ . ': $Id$'; } } -?> \ No newline at end of file