2017-04-07 18:30:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace ManiaControl\Callbacks\Structures\Common;
|
|
|
|
|
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
2017-04-07 23:26:35 +02:00
|
|
|
/**
|
|
|
|
* Base Structure Class for all Callbacks using a Response Id
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
* @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 18:30:48 +02:00
|
|
|
class BaseResponseStructure extends BaseStructure {
|
|
|
|
protected $responseId;
|
|
|
|
|
2017-04-07 23:26:35 +02:00
|
|
|
/**
|
|
|
|
* BaseResponseStructure constructor.
|
|
|
|
*
|
|
|
|
* @param \ManiaControl\ManiaControl $maniaControl
|
|
|
|
* @param $data
|
|
|
|
*/
|
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
|
|
|
parent::__construct($maniaControl, $data);
|
|
|
|
|
|
|
|
$this->responseId = $this->getPlainJsonObject()->responseid;
|
|
|
|
}
|
|
|
|
|
2017-04-07 18:30:48 +02:00
|
|
|
/**
|
|
|
|
* Get the Response Id
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-04-07 18:30:48 +02:00
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getResponseId() {
|
|
|
|
return $this->responseId;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|