diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/frontend/dto/LanguageDTO.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/frontend/dto/LanguageDTO.php b/app/frontend/dto/LanguageDTO.php new file mode 100644 index 0000000..fa39d03 --- /dev/null +++ b/app/frontend/dto/LanguageDTO.php @@ -0,0 +1,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); + } + +} + +?> |