2017-04-07 22:30:55 +02:00
|
|
|
<?php
|
|
|
|
|
2017-04-08 13:45:04 +02:00
|
|
|
namespace ManiaControl\Callbacks\Structures\Common;
|
2017-04-07 22:30:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Structure Class for the StatusCallback Structure Callback
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-04-07 22:30:55 +02:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
|
|
|
* @copyright 2014-2017 ManiaControl Team
|
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
|
|
|
class StatusCallbackStructure extends BaseResponseStructure {
|
|
|
|
protected $active;
|
2017-04-13 16:12:10 +02:00
|
|
|
protected $available;
|
2017-04-07 22:30:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct a new On Hit Structure
|
|
|
|
*
|
|
|
|
* @param ManiaControl $maniaControl
|
|
|
|
* @param array $data
|
|
|
|
*/
|
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
|
|
|
parent::__construct($maniaControl, $data);
|
|
|
|
|
2017-04-13 16:12:10 +02:00
|
|
|
$this->active = $this->getPlainJsonObject()->active;
|
|
|
|
$this->available = $this->getPlainJsonObject()->available;
|
2017-04-07 22:30:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* True if the Status (Like Combo Pause or Warmup) is Ongoing
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-04-07 22:30:55 +02:00
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public function getActive() {
|
|
|
|
return $this->active;
|
|
|
|
}
|
|
|
|
|
2017-04-13 16:12:10 +02:00
|
|
|
/**
|
|
|
|
* Checks if the Mode uses Warmup or not
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public function isAvailable() {
|
|
|
|
return $this->available;
|
|
|
|
}
|
|
|
|
|
2017-04-07 22:30:55 +02:00
|
|
|
}
|