Added language settings

This commit is contained in:
Pierre HUBERT
2018-08-15 08:16:22 +02:00
parent 5a21389017
commit 179ac1e4ea
3 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?php
/**
* Language settings base model
*
* @author Pierre HUBERT
*/
class LanguageSettings extends BaseUserModel {
//Available languages
const LANGUAGES = array("fr", "en");
//Private fields
private $lang;
//Set and get the language the user
public function set_lang(string $lang){
$this->lang = $lang;
}
public function has_lang() : bool {
return $this->lang != null;
}
public function get_lang() : string {
return $this->lang;
}
}