mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
64 lines
1.3 KiB
PHP
64 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Demostf\API\Data;
|
|
|
|
use Demostf\API\Demo\ChatMessage;
|
|
|
|
class ParsedDemo {
|
|
/** @var int */
|
|
private $redScore;
|
|
/** @var int */
|
|
private $blueScore;
|
|
/** @var ChatMessage[] */
|
|
private $chat;
|
|
/** @var ParsedPlayer[] */
|
|
private $players;
|
|
/** @var ParsedKill[] */
|
|
private $kills;
|
|
|
|
/**
|
|
* ParsedDemo constructor.
|
|
*
|
|
* @param ChatMessage[] $chat
|
|
* @param ParsedPlayer[] $players
|
|
* @param ParsedKill[] $kills
|
|
*/
|
|
public function __construct(int $redScore, int $blueScore, array $chat, array $players, array $kills) {
|
|
$this->redScore = $redScore;
|
|
$this->blueScore = $blueScore;
|
|
$this->chat = $chat;
|
|
$this->players = $players;
|
|
$this->kills = $kills;
|
|
}
|
|
|
|
public function getRedScore(): int {
|
|
return $this->redScore;
|
|
}
|
|
|
|
public function getBlueScore(): int {
|
|
return $this->blueScore;
|
|
}
|
|
|
|
/**
|
|
* @return ChatMessage[]
|
|
*/
|
|
public function getChat(): array {
|
|
return $this->chat;
|
|
}
|
|
|
|
/**
|
|
* @return ParsedPlayer[]
|
|
*/
|
|
public function getPlayers(): array {
|
|
return $this->players;
|
|
}
|
|
|
|
/**
|
|
* @return ParsedKill[]
|
|
*/
|
|
public function getKills(): array {
|
|
return $this->kills;
|
|
}
|
|
}
|