2017-03-23 20:52:23 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace ManiaControl\Callbacks\Structures\ShootMania;
|
|
|
|
|
|
|
|
|
2017-03-30 19:49:45 +02:00
|
|
|
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
|
2017-03-23 20:52:23 +01:00
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Structure Class for the Default Event Structure Callback
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-23 20:52:23 +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-03-25 20:19:45 +01:00
|
|
|
class OnDefaultEventStructure extends BaseStructure {
|
2017-03-26 12:42:20 +02:00
|
|
|
private $time;
|
|
|
|
private $type;
|
2017-03-24 22:49:43 +01:00
|
|
|
|
2017-04-07 23:26:35 +02:00
|
|
|
/**
|
|
|
|
* OnDefaultEventStructure constructor.
|
|
|
|
*
|
|
|
|
* @param \ManiaControl\ManiaControl $maniaControl
|
|
|
|
* @param $data
|
|
|
|
*/
|
2017-03-23 20:52:23 +01:00
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
2017-03-23 21:01:44 +01:00
|
|
|
parent::__construct($maniaControl, $data);
|
2017-03-23 20:52:23 +01:00
|
|
|
|
2017-03-24 22:49:43 +01:00
|
|
|
$this->time = $this->getPlainJsonObject()->time;
|
|
|
|
$this->type = $this->getPlainJsonObject()->type;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-03-26 12:42:20 +02:00
|
|
|
* Returns Server time when the event occured
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-24 22:49:43 +01:00
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getTime() {
|
|
|
|
return $this->time;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-03-26 12:42:20 +02:00
|
|
|
* Returns the type of event
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-24 22:49:43 +01:00
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getType() {
|
|
|
|
return $this->type;
|
2017-03-23 20:52:23 +01:00
|
|
|
}
|
|
|
|
}
|