2017-03-24 17:08:27 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace ManiaControl\Callbacks\Structures\ManiaPlanet;
|
|
|
|
|
|
|
|
|
2020-04-21 17:57:36 +02:00
|
|
|
|
2017-04-13 16:12:10 +02:00
|
|
|
use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure;
|
2017-03-24 17:08:27 +01:00
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Structure Class for the Default Start End Callbacks
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-24 17:08:27 +01:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
2020-01-22 10:39:35 +01:00
|
|
|
* @copyright 2014-2020 ManiaControl Team
|
2017-03-24 17:08:27 +01:00
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
2017-04-13 16:12:10 +02:00
|
|
|
class StartEndStructure extends BaseTimeStructure {
|
2017-03-26 12:42:20 +02:00
|
|
|
private $count;
|
2023-10-16 14:06:26 +02:00
|
|
|
private $valid;
|
2017-03-24 17:08:27 +01:00
|
|
|
|
2017-04-07 23:26:35 +02:00
|
|
|
/**
|
|
|
|
* StartEndStructure constructor.
|
|
|
|
*
|
|
|
|
* @param \ManiaControl\ManiaControl $maniaControl
|
|
|
|
* @param $data
|
|
|
|
*/
|
2017-03-24 17:08:27 +01:00
|
|
|
public function __construct(ManiaControl $maniaControl, $data) {
|
|
|
|
parent::__construct($maniaControl, $data);
|
|
|
|
|
|
|
|
$this->count = $this->getPlainJsonObject()->count;
|
2023-10-16 14:06:26 +02:00
|
|
|
$this->valid = $this->getPlainJsonObject()->valid;
|
2017-03-24 17:08:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-03-26 12:42:20 +02:00
|
|
|
* Get the Count of this Section
|
|
|
|
*
|
2017-04-07 23:26:35 +02:00
|
|
|
* @api
|
2017-03-26 12:42:20 +02:00
|
|
|
* @return int
|
2017-03-24 17:08:27 +01:00
|
|
|
*/
|
|
|
|
public function getCount() {
|
|
|
|
return $this->count;
|
|
|
|
}
|
2023-10-16 14:06:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the Valid Round Count of this Section
|
|
|
|
*
|
|
|
|
* @api
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getValidRoundCount() {
|
|
|
|
return $this->valid;
|
|
|
|
}
|
2017-03-24 17:08:27 +01:00
|
|
|
}
|