| Next revision | Previous revision |
| scriptlog:lib:core:translationloader [2026/09/26 09:09] – admin admin | scriptlog:lib:core:translationloader [2026/09/26 09:34] (current) – admin admin |
|---|
| //None.// | //None.// |
| |
| ======= Properties (4) ======= | ======= Properties (7) ======= |
| |
| ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | ''private'' | ''(untyped)'' | ''$cacheEnabled'' | ''true;'' | 13 | | | ''private'' | ''(untyped)'' | ''$cacheDir'' | | 12 | |
| | ''private'' | ''(untyped)'' | ''$cacheTtl'' | ''3600;'' | 14 | | | ''private'' | ''(untyped)'' | ''$cacheEnabled'' | ''true'' | 13 | |
| | ''private'' | ''(untyped)'' | ''$loaded'' | ''[];'' | 15 | | | ''private'' | ''(untyped)'' | ''$cacheTtl'' | ''3600'' | 14 | |
| | ''private'' | ''(untyped)'' | ''$initialized'' | ''false;'' | 18 | | | ''private'' | ''(untyped)'' | ''$loaded'' | ''[]'' | 15 | |
| | | ''private'' | ''(untyped)'' | ''$translationDao'' | | 16 | |
| | | ''private'' | ''(untyped)'' | ''$languageDao'' | | 17 | |
| | | ''private'' | ''(untyped)'' | ''$initialized'' | ''false'' | 18 | |
| |
| ======= Methods (17) ======= | ======= Methods (17) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | (undocumented) | 20 | | | public | ''__construct()'' | (undocumented) | 20 | |
| | private | ''initializeDao()'' | (undocumented) | 27 | | | private | ''initializeDao()'' | (undocumented) | 27 | |
| | private | ''ensureCacheDirectory()'' | (undocumented) | 45 | | | private | ''ensureCacheDirectory()'' | (undocumented) | 45 | |
| | public | ''load()'' | (undocumented) | 52 | | | public | ''load()'' | (undocumented) | 52 | |
| | public | ''get()'' | (undocumented) | 77 | | | public | ''get()'' | (undocumented) | 77 | |
| | private | ''loadFromCache()'' | (undocumented) | 91 | | | private | ''loadFromCache()'' | (undocumented) | 91 | |
| | private | ''saveToCache()'' | (undocumented) | 109 | | | private | ''saveToCache()'' | (undocumented) | 109 | |
| | private | ''loadFromDatabase()'' | (undocumented) | 127 | | | private | ''loadFromDatabase()'' | (undocumented) | 127 | |
| | private | ''loadDefaultStrings()'' | (undocumented) | 153 | | | private | ''loadDefaultStrings()'' | (undocumented) | 153 | |
| | private | ''getThemeIdentifier()'' | (undocumented) | 166 | | | private | ''getThemeIdentifier()'' | (undocumented) | 166 | |
| | private | ''getCacheFilePath()'' | (undocumented) | 178 | | | private | ''getCacheFilePath()'' | (undocumented) | 178 | |
| | private | ''isCacheExpired()'' | (undocumented) | 183 | | | private | ''isCacheExpired()'' | (undocumented) | 183 | |
| | public | ''invalidate()'' | (undocumented) | 193 | | | public | ''invalidate()'' | (undocumented) | 193 | |
| | private | ''interpolate()'' | (undocumented) | 204 | | | private | ''interpolate()'' | (undocumented) | 204 | |
| | private | ''getCurrentLocale()'' | (undocumented) | 213 | | | private | ''getCurrentLocale()'' | (undocumented) | 213 | |
| | public | ''isCacheEnabled()'' | (undocumented) | 222 | | | public | ''isCacheEnabled()'' | (undocumented) | 222 | |
| | public | ''setCacheEnabled()'' | (undocumented) | 227 | | | public | ''setCacheEnabled()'' | (undocumented) | 227 | |
| |
| |
| //lines 52–75 (24)// | //lines 52–75 (24)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| //lines 77–89 (13)// | //lines 77–89 (13)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$key'' | ''string'' | //required// | //none// | | | ''$key'' | ''string'' | //required// | //none// | |
| | ''$locale'' | ''?string'' | ''null'' | //none// | | | ''$locale'' | ''?string'' | ''null'' | //none// | |
| | ''$params'' | ''array'' | ''[]'' | //none// | | | ''$params'' | ''array'' | ''[]'' | //none// | |
| |
| **Returns:** ''string'' | **Returns:** ''string'' |
| //lines 91–107 (17)// | //lines 91–107 (17)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''?array'' | **Returns:** ''?array'' |
| //lines 109–125 (17)// | //lines 109–125 (17)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| | ''$translations'' | ''array'' | //required// | //none// | | | ''$translations'' | ''array'' | //required// | //none// | |
| |
| **Returns:** ''void'' | **Returns:** ''void'' |
| //lines 127–151 (25)// | //lines 127–151 (25)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| //lines 153–164 (12)// | //lines 153–164 (12)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''array'' | **Returns:** ''array'' |
| //lines 178–181 (4)// | //lines 178–181 (4)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''string'' | **Returns:** ''string'' |
| //lines 183–191 (9)// | //lines 183–191 (9)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$cacheFile'' | ''string'' | //required// | //none// | | | ''$cacheFile'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''bool'' | **Returns:** ''bool'' |
| //lines 193–202 (10)// | //lines 193–202 (10)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$locale'' | ''string'' | //required// | //none// | | | ''$locale'' | ''string'' | //required// | //none// | |
| |
| **Returns:** ''void'' | **Returns:** ''void'' |
| //lines 204–211 (8)// | //lines 204–211 (8)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$text'' | ''string'' | //required// | //none// | | | ''$text'' | ''string'' | //required// | //none// | |
| | ''$params'' | ''array'' | //required// | //none// | | | ''$params'' | ''array'' | //required// | //none// | |
| |
| **Returns:** ''string'' | **Returns:** ''string'' |
| //lines 227–230 (4)// | //lines 227–230 (4)// |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$enabled'' | ''bool'' | //required// | //none// | | | ''$enabled'' | ''bool'' | //required// | //none// | |
| |
| **Returns:** ''void'' | **Returns:** ''void'' |
| ======= Imports ======= | ======= Imports ======= |
| |
| ^ Alias ^ Fully-qualified name ^ | ^ Alias ^ Fully-qualified name ^ |
| | ''LanguageDao'' | [[scriptlog:lib:dao:languagedao|''Scriptlog\Dao\LanguageDao'']] | | | ''LanguageDao'' | [[scriptlog:lib:dao:languagedao|''Scriptlog\Dao\LanguageDao'']] | |
| | ''TranslationDao'' | [[scriptlog:lib:dao:translationdao|''Scriptlog\Dao\TranslationDao'']] | | | ''TranslationDao'' | [[scriptlog:lib:dao:translationdao|''Scriptlog\Dao\TranslationDao'']] | |
| |
| |