MediaWiki  1.30.0
LocalisationUpdate\JSONReader Class Reference

Reads MediaWiki JSON i18n files. More...

Inheritance diagram for LocalisationUpdate\JSONReader:
Collaboration diagram for LocalisationUpdate\JSONReader:

Public Member Functions

 __construct ( $code=null)
 
 parse ( $contents)
 Returns a list of messages indexed by language code. More...
 

Protected Attributes

 $code
 

Detailed Description

Reads MediaWiki JSON i18n files.

Definition at line 13 of file JSONReader.php.

Constructor & Destructor Documentation

◆ __construct()

LocalisationUpdate\JSONReader::__construct (   $code = null)

Definition at line 17 of file JSONReader.php.

References $code, and code.

Member Function Documentation

◆ parse()

LocalisationUpdate\JSONReader::parse (   $contents)

Returns a list of messages indexed by language code.

Example array( 'en' => array( 'key' => 'value' ) );

Parameters
string$contentsFile contents as a string.
Returns
array

Implements LocalisationUpdate\Reader.

Definition at line 21 of file JSONReader.php.

References $messages, code, and FormatJson\decode().

Member Data Documentation

◆ $code

LocalisationUpdate\JSONReader::$code
protected

Definition at line 15 of file JSONReader.php.


The documentation for this class was generated from the following file: