added two new callbacks
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Lukas
|
||||
* Date: 22. Mär. 2017
|
||||
* Time: 18:26
|
||||
*/
|
||||
|
||||
namespace ManiaControl\Callbacks\Structures;
|
||||
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
* Base Structure of all Callback Structures
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
abstract class BaseStructure {
|
||||
/** @var ManiaControl $maniaControl */
|
||||
protected $maniaControl;
|
||||
|
@ -6,10 +6,26 @@ namespace ManiaControl\Callbacks\Structures\ManiaPlanet;
|
||||
use ManiaControl\Callbacks\Structures\BaseStructure;
|
||||
use ManiaControl\ManiaControl;
|
||||
|
||||
/**
|
||||
* Structure Class for the Default Start Server Callback
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class StartServerStructure extends BaseStructure {
|
||||
public $restarted;
|
||||
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->restarted = $this->getPlainJsonObject()->restarted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRestarted() {
|
||||
return $this->restarted;
|
||||
}
|
||||
}
|
@ -27,8 +27,8 @@ class CallbacksListStructure extends BaseStructure {
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->responseId = $this->getJson()->responseid;
|
||||
$this->callbacks = $this->getJson()->callbacks;
|
||||
$this->responseId = $this->getPlainJsonObject()->responseid;
|
||||
$this->callbacks = $this->getPlainJsonObject()->callbacks;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user