38 lines
675 B
PHP
38 lines
675 B
PHP
|
<?php
|
||
|
namespace Makai;
|
||
|
|
||
|
use Index\AString;
|
||
|
use Index\WString;
|
||
|
|
||
|
class LanguageInfo {
|
||
|
private AString $id;
|
||
|
private WString $name;
|
||
|
private ?int $colour;
|
||
|
|
||
|
public function __construct(
|
||
|
AString $id,
|
||
|
WString $name,
|
||
|
?int $colour
|
||
|
) {
|
||
|
$this->id = $id;
|
||
|
$this->name = $name;
|
||
|
$this->colour = $colour;
|
||
|
}
|
||
|
|
||
|
public function getId(): AString {
|
||
|
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;
|
||
|
}
|
||
|
}
|