TrackManiaControl/core/Callbacks/Structures/ManiaPlanet/StartEndStructure.php

54 lines
1.1 KiB
PHP
Raw Normal View History

2017-03-24 17:08:27 +01:00
<?php
namespace ManiaControl\Callbacks\Structures\ManiaPlanet;
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
*/
class StartEndStructure extends BaseTimeStructure {
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
}
/**
* Get the Count of this Section
*
2017-04-07 23:26:35 +02:00
* @api
* @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
}