ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
Class ilCachedLanguage. More...
Public Member Functions | |
getContainerKey () | |
isForced () | |
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 | |
ILIAS Cache Container Container | $language_cache |
bool | $loaded = false |
string | $language_key = "en" |
array | $translations = array() |
Static Protected Attributes | |
static array | $instances = array() |
|
protected |
ilCachedLanguage constructor.
Definition at line 41 of file class.ilCachedLanguage.php.
References $DIC, 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 112 of file class.ilCachedLanguage.php.
References getLanguageKey(), and setLoaded().
ilCachedLanguage::flush | ( | ) |
Definition at line 151 of file class.ilCachedLanguage.php.
References readFromDB(), and writeToCache().
ilCachedLanguage::getContainerKey | ( | ) |
Implements ILIAS\Cache\Container\Request.
Definition at line 54 of file class.ilCachedLanguage.php.
|
static |
Definition at line 142 of file class.ilCachedLanguage.php.
Referenced by ilLanguage\__construct(), ilObjLanguageExt\_saveValues(), ilObjLanguage\replaceLangModule(), and ilObjLanguageDBAccess\replaceLangModules().
ilCachedLanguage::getLanguageKey | ( | ) |
Return language key.
Definition at line 169 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by deleteInCache(), readFromCache(), readFromDB(), and writeToCache().
ilCachedLanguage::getLoaded | ( | ) |
Definition at line 179 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct().
ilCachedLanguage::getTranslations | ( | ) |
Return translations as array.
Definition at line 195 of file class.ilCachedLanguage.php.
References $translations.
Referenced by writeToCache().
ilCachedLanguage::isActive | ( | ) |
Return whether the global cache is active.
Definition at line 68 of file class.ilCachedLanguage.php.
ilCachedLanguage::isForced | ( | ) |
Implements ILIAS\Cache\Container\Request.
Definition at line 60 of file class.ilCachedLanguage.php.
|
protected |
Read from cache.
Definition at line 76 of file class.ilCachedLanguage.php.
References getLanguageKey(), null, setLoaded(), and setTranslations().
Referenced by __construct().
|
protected |
Read data from table lng_module from DB.
Definition at line 121 of file class.ilCachedLanguage.php.
References $DIC, $ilDB, $q, $res, getLanguageKey(), and setTranslations().
Referenced by __construct(), and flush().
ilCachedLanguage::setLanguageKey | ( | string | $language_key | ) |
Set language key.
Definition at line 161 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by __construct().
ilCachedLanguage::setLoaded | ( | bool | $loaded | ) |
Definition at line 174 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct(), deleteInCache(), and readFromCache().
ilCachedLanguage::setTranslations | ( | array | $translations | ) |
Set translations.
Definition at line 187 of file class.ilCachedLanguage.php.
References $translations.
Referenced by readFromCache(), and readFromDB().
ilCachedLanguage::writeToCache | ( | ) |
Write to global cache.
Definition at line 101 of file class.ilCachedLanguage.php.
References getLanguageKey(), and getTranslations().
Referenced by __construct(), and flush().
|
staticprotected |
Definition at line 36 of file class.ilCachedLanguage.php.
|
protected |
Definition at line 32 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().