added abstract basestructure class above all callback structures

This commit is contained in:
kremsy 2017-03-22 18:31:53 +01:00
parent a1373b4e7c
commit 4ab3bf7650
3 changed files with 30 additions and 5 deletions

View File

@ -0,0 +1,25 @@
<?php
/**
* Created by PhpStorm.
* User: Lukas
* Date: 22. Mär. 2017
* Time: 18:26
*/
namespace ManiaControl\Callbacks\Structures;
use ManiaControl\ManiaControl;
abstract class BaseStructure {
/** @var ManiaControl $maniaControl */
protected $maniaControl;
/**
* Var_Dump the Structure
*/
public function dump() {
var_dump(json_decode(json_encode($this)));
}
}

View File

@ -2,6 +2,7 @@
namespace ManiaControl\Callbacks\Structures\ManiaPlanet; namespace ManiaControl\Callbacks\Structures\ManiaPlanet;
use ManiaControl\Callbacks\Structures\BaseStructure;
use ManiaControl\ManiaControl; use ManiaControl\ManiaControl;
/** /**
@ -11,15 +12,12 @@ use ManiaControl\ManiaControl;
* @copyright 2014-2017 ManiaControl Team * @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/ */
class CallbacksListStructure { class CallbacksListStructure extends BaseStructure {
/** @var string $responseId */ /** @var string $responseId */
private $responseId; private $responseId;
/** @var array $callbacks */ /** @var array $callbacks */
private $callbacks; private $callbacks;
/** @var ManiaControl $maniaControl */
private $maniaControl;
/** /**
* Construct a new Armor Empty Structure * Construct a new Armor Empty Structure
* *

View File

@ -9,6 +9,8 @@
namespace ManiaControl\Callbacks\Structures\Trackmania; namespace ManiaControl\Callbacks\Structures\Trackmania;
class DefaultEventStructure { use ManiaControl\Callbacks\Structures\BaseStructure;
class DefaultEventStructure extends BaseStructure {
} }