ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
isActive () | |
Return whether the global cache is active. More... | |
writeToCache () | |
Write to global cache. More... | |
deleteInCache () | |
Delete the cache entry for this language without flushing the whole global cache Using this function avoids a flush loop when languages are updated A missing entry will cause the next request to refill the cache in the constructor of this class. More... | |
flush () | |
setLanguageKey (string $language_key) | |
Set language key. More... | |
getLanguageKey () | |
Return language key. More... | |
setLoaded (bool $loaded) | |
getLoaded () | |
setTranslations (array $translations) | |
Set translations. More... | |
getTranslations () | |
Return translations as array. More... | |
Static Public Member Functions | |
static | getInstance ($key) |
Protected Member Functions | |
__construct (string $language_key) | |
ilCachedLanguage constructor. More... | |
readFromCache () | |
Read from cache. More... | |
readFromDB () | |
Read data from table lng_module from DB. More... | |
Protected Attributes | |
ilGlobalCache | $global_cache |
bool | $loaded = false |
string | $language_key = "en" |
array | $translations = array() |
Static Protected Attributes | |
static array | $instances = array() |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilCachedLanguage
Definition at line 30 of file class.ilCachedLanguage.php.
|
protected |
ilCachedLanguage constructor.
Definition at line 41 of file class.ilCachedLanguage.php.
References ilGlobalCache\COMP_CLNG, ilGlobalCache\getInstance(), getLoaded(), readFromCache(), readFromDB(), setLanguageKey(), setLoaded(), and writeToCache().
ilCachedLanguage::deleteInCache | ( | ) |
Delete the cache entry for this language without flushing the whole global cache Using this function avoids a flush loop when languages are updated A missing entry will cause the next request to refill the cache in the constructor of this class.
Definition at line 91 of file class.ilCachedLanguage.php.
References getLanguageKey(), and setLoaded().
ilCachedLanguage::flush | ( | ) |
Definition at line 132 of file class.ilCachedLanguage.php.
References readFromDB(), and writeToCache().
|
static |
Definition at line 123 of file class.ilCachedLanguage.php.
References ILIAS\LTI\ToolProvider\$key.
Referenced by ilLanguage\__construct(), ilObjLanguageExt\_saveValues(), ilObjLanguage\insert(), and ilObjLanguageDBAccess\replaceLangModules().
ilCachedLanguage::getLanguageKey | ( | ) |
Return language key.
Definition at line 152 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by deleteInCache(), readFromCache(), readFromDB(), and writeToCache().
ilCachedLanguage::getLoaded | ( | ) |
Definition at line 162 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct().
ilCachedLanguage::getTranslations | ( | ) |
Return translations as array.
Definition at line 178 of file class.ilCachedLanguage.php.
References $translations.
Referenced by writeToCache().
ilCachedLanguage::isActive | ( | ) |
Return whether the global cache is active.
Definition at line 56 of file class.ilCachedLanguage.php.
|
protected |
Read from cache.
Definition at line 64 of file class.ilCachedLanguage.php.
References getLanguageKey(), setLoaded(), and setTranslations().
Referenced by __construct().
|
protected |
Read data from table lng_module from DB.
Definition at line 102 of file class.ilCachedLanguage.php.
References $DIC, $ilDB, $res, getLanguageKey(), and setTranslations().
Referenced by __construct(), and flush().
ilCachedLanguage::setLanguageKey | ( | string | $language_key | ) |
Set language key.
Definition at line 144 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by __construct().
ilCachedLanguage::setLoaded | ( | bool | $loaded | ) |
Definition at line 157 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct(), deleteInCache(), and readFromCache().
ilCachedLanguage::setTranslations | ( | array | $translations | ) |
Set translations.
Definition at line 170 of file class.ilCachedLanguage.php.
References $translations.
Referenced by readFromCache(), and readFromDB().
ilCachedLanguage::writeToCache | ( | ) |
Write to global cache.
Definition at line 78 of file class.ilCachedLanguage.php.
References getLanguageKey(), and getTranslations().
Referenced by __construct(), and flush().
|
protected |
Definition at line 32 of file class.ilCachedLanguage.php.
|
staticprotected |
Definition at line 36 of file class.ilCachedLanguage.php.
|
protected |
Definition at line 34 of file class.ilCachedLanguage.php.
Referenced by getLanguageKey(), and setLanguageKey().
|
protected |
Definition at line 33 of file class.ilCachedLanguage.php.
Referenced by getLoaded(), and setLoaded().
|
protected |
Definition at line 35 of file class.ilCachedLanguage.php.
Referenced by getTranslations(), and setTranslations().