42 if ( isset( $conf[
'directory'] ) ) {
50 $this->currentLang =
$code;
52 $this->data[
$code] = [];
53 if ( file_exists( $this->fname ) ) {
58 public function set( $key,
$value ) {
74 if ( is_object(
$value ) ) {
78 if ( is_array(
$value ) ) {
80 return [
'a', array_map(
function ( $v ) {
85 throw new RuntimeException(
'Cannot encode ' . var_export(
$value,
true ) );
95 public static function decode( array $encoded ) {
105 return array_map(
function ( $v ) {
109 throw new RuntimeException(
110 'Unable to decode ' . var_export( $encoded,
true ) );
118 "// Generated by LCStoreStaticArray.php -- do not edit!\n" .
120 var_export( $this->data[$this->currentLang],
true ) .
';'
122 $this->currentLang =
null;
126 public function get(
$code, $key ) {
127 if ( !array_key_exists(
$code, $this->data ) ) {
129 if ( !file_exists(
$fname ) ) {
135 if ( array_key_exists( $key,
$data ) ) {
unserialize( $serialized)
$wgCacheDirectory
Directory for caching data in the local filesystem.
finishWrite()
Finish a write transaction.
static encode( $value)
Encodes a value into an array format.
static decode(array $encoded)
Decode something that was encoded with encode.
array $data
Localisation data.
startWrite( $code)
Start a write transaction.
string $directory
Directory for cache files.
string null $currentLang
Current language code.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
Interface for the persistence layer of LocalisationCache.
The most up to date schema for the tables in the database will always be tables sql in the maintenance directory