diff options
author | emkael <emkael@tlen.pl> | 2016-06-10 11:50:34 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-06-10 11:50:34 +0200 |
commit | 2b5232a1193356e4bb9ad2d9234735890cd32eaa (patch) | |
tree | d0207379d1473bf15874985314709f039de2089f /app/frontend | |
parent | b47a81da8fbf6b6384c8b068132b257835ffff01 (diff) |
* DTO for language selection
Diffstat (limited to 'app/frontend')
-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); + } + +} + +?> |