proper scoping to callback structures + usage Information Method

This commit is contained in:
kremsy
2017-03-26 12:42:20 +02:00
parent 4effad8f6d
commit de3bae9029
16 changed files with 172 additions and 132 deletions

View File

@ -14,9 +14,9 @@ use ManiaControl\ManiaControl;
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class OnCommandStructure extends BaseStructure {
public $time;
public $name;
public $value;
private $time;
private $name;
private $value;
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -26,13 +26,9 @@ class OnCommandStructure extends BaseStructure {
$this->value = $this->getPlainJsonObject()->value;
}
/** Dumps the Object with some Information */
public function dump() {
parent::dump();
var_dump("With getShooter() you get a Player Object");
}
/**
* < Server time when the event occured
*
* @return int
*/
public function getTime() {
@ -40,18 +36,24 @@ class OnCommandStructure extends BaseStructure {
}
/**
* @return mixed
* < Name of the command
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* @return \ManiaControl\Players\Player
* < The value passed by the command
* "boolean": true,
* "integer": 123,
* "real": 123.456,
* "text": "an example value"
*
* @return mixed
*/
public function getValue() {
return $this->value;
}
}