MediaWiki REL1_34
ReaderFactory.php
Go to the documentation of this file.
1<?php
8namespace LocalisationUpdate;
9
20 public function getReader( $filename ) {
21 if ( preg_match( '/\.json/', $filename ) ) {
22 $code = basename( $filename, '.json' );
23 return new JSONReader( $code );
24 }
25
26 throw new \Exception( "Unknown file format: " . $filename );
27 }
28}
Reads MediaWiki JSON i18n files.
Constructs readers for files based on the names.
getReader( $filename)
Constructs a suitable reader for a given path.