|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
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... | |
| getContainerKey () | |
| isForced () | |
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 115 of file class.ilCachedLanguage.php.
References getLanguageKey(), and setLoaded().
Here is the call graph for this function:| ilCachedLanguage::flush | ( | ) |
Definition at line 154 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 145 of file class.ilCachedLanguage.php.
Referenced by ilLanguage\__construct(), and ILIAS\Language\Setup\TranslationCacheLegacyProxy\invalidate().
Here is the caller graph for this function:| ilCachedLanguage::getLanguageKey | ( | ) |
Return language key.
Definition at line 172 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 182 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 198 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.
Always true, so cached_modules is always filled: ilLanguage::loadLanguageModule() must check the PO/MO overlay of a migrated module before cached_modules, or the DB cache hides the overlay.
Definition at line 71 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 79 of file class.ilCachedLanguage.php.
References $translations, 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 124 of file class.ilCachedLanguage.php.
References $DIC, $ilDB, $res, $translations, 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 164 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 177 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 190 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 104 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(), readFromCache(), readFromDB(), and setTranslations().