2017-03-22 18:10:21 +01:00
|
|
|
<?php
|
|
|
|
|
2017-03-23 20:52:23 +01:00
|
|
|
namespace ManiaControl\Callbacks\Structures\XmlRpc;
|
2017-03-22 18:10:21 +01:00
|
|
|
|
2017-04-07 18:30:48 +02:00
|
|
|
use ManiaControl\Callbacks\Structures\Common\BaseResponseStructure;
|
2017-03-22 18:10:21 +01:00
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
|
|
|
/**
|
2017-04-07 23:03:56 +02:00
|
|
|
* Structure Class for the ApiVersion Structure Callback
|
2017-03-22 18:10:21 +01:00
|
|
|
*
|
2017-04-07 23:03:56 +02:00
|
|
|
* @api
|
2017-03-22 18:10:21 +01:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
|
|
|
* @copyright 2014-2017 ManiaControl Team
|
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
2017-04-07 23:03:56 +02:00
|
|
|
class ApiVersionStructure extends BaseResponseStructure {
|
|
|
|
private $version;
|
2017-03-22 18:10:21 +01:00
|
|
|
|
|
|
|
/**
|
2017-04-07 23:03:56 +02:00
|
|
|
* Construct a new Callbacks Version Structure
|
2017-03-22 18:10:21 +01:00
|
|
|
*
|
|
|
|
* @param ManiaControl $maniaControl
|
|
|
|
* @param array $data
|
|
|
|
*/
|
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
2017-03-23 21:01:44 +01:00
|
|
|
parent::__construct($maniaControl, $data);
|
2017-03-22 18:10:21 +01:00
|
|
|
|
2017-04-07 23:03:56 +02:00
|
|
|
$this->version = $this->getPlainJsonObject()->version;
|
2017-03-22 18:10:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-04-07 23:03:56 +02:00
|
|
|
* Gets the API Version
|
2017-03-26 12:56:44 +02:00
|
|
|
*
|
2017-04-07 23:03:56 +02:00
|
|
|
* @api
|
|
|
|
* @return string version
|
2017-03-22 18:10:21 +01:00
|
|
|
*/
|
2017-04-07 23:03:56 +02:00
|
|
|
public function getVersion() {
|
|
|
|
return $this->version;
|
2017-03-22 18:10:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|