summaryrefslogtreecommitdiff
path: root/app/frontend/dto/LanguageDTO.php
blob: fa39d039768d454eed6ee9456c80a5371a54a02e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

class LanguageDTO {

    public $Label;
    public $Name;

    public function __construct(string $name) {
        $this->Name = $name;
        $this->Label = Locale::getDisplayLanguage($this->Name);
    }

    public static function __compare(LanguageDTO $l1, LanguageDTO $l2) {
        return strcmp($l1->Name, $l2->Name);
    }

}

?>