|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
Class ilCachedLanguage. More...
Inheritance diagram for ilCachedLanguage:
Collaboration diagram for ilCachedLanguage: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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| ilCachedLanguage::flush | ( | ) |
Definition at line 151 of file class.ilCachedLanguage.php.
References readFromDB(), and writeToCache().
Here is the call graph for this function:| 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.
References ILIAS\LTI\ToolProvider\$key.
Referenced by ilLanguage\__construct(), ilObjLanguageExt\_saveValues(), ilObjLanguage\insert(), and ilObjLanguageDBAccess\replaceLangModules().
Here is the caller graph for this function:| ilCachedLanguage::getLanguageKey | ( | ) |
Return language key.
Definition at line 169 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by deleteInCache(), readFromCache(), readFromDB(), and writeToCache().
Here is the caller graph for this function:| ilCachedLanguage::getLoaded | ( | ) |
Definition at line 179 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct().
Here is the caller graph for this function:| ilCachedLanguage::getTranslations | ( | ) |
Return translations as array.
Definition at line 195 of file class.ilCachedLanguage.php.
References $translations.
Referenced by writeToCache().
Here is the caller graph for this function:| 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 ILIAS\LTI\ToolProvider\$key, getLanguageKey(), setLoaded(), and setTranslations().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCachedLanguage::setLanguageKey | ( | string | $language_key | ) |
Set language key.
Definition at line 161 of file class.ilCachedLanguage.php.
References $language_key.
Referenced by __construct().
Here is the caller graph for this function:| ilCachedLanguage::setLoaded | ( | bool | $loaded | ) |
Definition at line 174 of file class.ilCachedLanguage.php.
References $loaded.
Referenced by __construct(), deleteInCache(), and readFromCache().
Here is the caller graph for this function:| ilCachedLanguage::setTranslations | ( | array | $translations | ) |
Set translations.
Definition at line 187 of file class.ilCachedLanguage.php.
References $translations.
Referenced by readFromCache(), and readFromDB().
Here is the caller graph for this function:| ilCachedLanguage::writeToCache | ( | ) |
Write to global cache.
Definition at line 101 of file class.ilCachedLanguage.php.
References getLanguageKey(), and getTranslations().
Referenced by __construct(), and flush().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().