callback refactor

This commit is contained in:
kremsy
2017-04-14 16:30:33 +02:00
parent da408a9bee
commit 486263826d
7 changed files with 207 additions and 178 deletions

View File

@ -14,40 +14,5 @@ use ManiaControl\ManiaControl;
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class OnDefaultEventStructure extends BaseStructure {
private $time;
private $type;
/**
* OnDefaultEventStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->time = $this->getPlainJsonObject()->time;
$this->type = $this->getPlainJsonObject()->type;
}
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
return $this->time;
}
/**
* Returns the type of event
*
* @api
* @return string
*/
public function getType() {
return $this->type;
}
class OnDefaultEventStructure extends CommonDefaultEventStructure {
}