mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
28 lines
462 B
PHP
28 lines
462 B
PHP
<?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;
|
|
}
|
|
} |