[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @file 4 * @author Niklas Laxström 5 * @license GPL-2.0+ 6 */ 7 8 /** 9 * Reads MediaWiki JSON i18n files. 10 */ 11 class LU_JSONReader implements LU_Reader { 12 /// @var string Language tag 13 protected $code; 14 15 public function __construct( $code = null ) { 16 $this->code = $code; 17 } 18 19 public function parse( $contents ) { 20 $messages = FormatJson::decode( $contents, true ); 21 unset( $messages['@metadata'] ); 22 23 if ( $this->code ) { 24 return array( $this->code => $messages ); 25 } 26 27 // Assuming that the array is keyed by language codes 28 return $messages; 29 } 30 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |