2022-02-05 03:35:42 +00:00
|
|
|
<?php
|
|
|
|
namespace Makai;
|
|
|
|
|
|
|
|
use Index\AString;
|
|
|
|
use Index\WString;
|
|
|
|
|
|
|
|
class LanguageInfo {
|
2022-02-06 01:36:05 +00:00
|
|
|
private string $id;
|
2022-02-05 03:35:42 +00:00
|
|
|
private WString $name;
|
|
|
|
private ?int $colour;
|
|
|
|
|
|
|
|
public function __construct(
|
2022-02-06 01:36:05 +00:00
|
|
|
string $id,
|
2022-02-05 03:35:42 +00:00
|
|
|
WString $name,
|
|
|
|
?int $colour
|
|
|
|
) {
|
|
|
|
$this->id = $id;
|
|
|
|
$this->name = $name;
|
|
|
|
$this->colour = $colour;
|
|
|
|
}
|
|
|
|
|
2022-02-06 01:36:05 +00:00
|
|
|
public function getId(): string {
|
2022-02-05 03:35:42 +00:00
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getName(): WString {
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasColour(): bool {
|
|
|
|
return $this->colour !== null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getColour(): ?int {
|
|
|
|
return $this->colour;
|
|
|
|
}
|
|
|
|
}
|