Property | Type | Description | |
---|---|---|---|
$cache | array | Local cache. | |
$language | string | Language. | |
$levels | integer | How much containers to use in Redis for translations. Calculated with 16^$levels. | |
$redis | Redis object. |
Method | Description | |
---|---|---|
__construct ( array $options ) | Class constructor. | |
add ( string $translateKey, string $message ) : boolean | Adds a translation for given key (No existence check!) | |
delete ( string $translateKey ) : boolean | Deletes a translation for given key (No existence check!) | |
exists ( string $translateKey ) : boolean | ||
offsetExists ( string $translateKey ) : string | ||
offsetGet ( string $translateKey ) : string | ||
offsetSet ( string $translateKey, string $message ) : string | ||
offsetUnset ( string $translateKey ) : string | ||
query ( string $translateKey, array $placeholders = null ) : string | ||
set ( string $translateKey, string $message ) : boolean | Sets (insert or updates) a translation for given key | |
update ( string $translateKey, string $message ) : boolean | Update a translation for given key (No existence check!) |
Method | Description | |
---|---|---|
getLongKey ( string $index ) : string | Returns long key for index. | |
getShortKey ( string $index ) : string | Returns short key for index. | |
loadValueByKey ( string $key ) | Loads key from Redis to local cache. |
protected getLongKey ( string $index ) : string | ||
$index | string | |
return | string |
protected getShortKey ( string $index ) : string | ||
$index | string | |
return | string |
protected loadValueByKey ( string $key ) | ||
$key | string |
public offsetExists ( string $translateKey ) : string | ||
$translateKey | string | |
return | string |
public offsetUnset ( string $translateKey ) : string | ||
$translateKey | string | |
return | string |
protected int $levels | ||
return | integer |