MediaWiki
1.34.0
ReaderFactory.php
Go to the documentation of this file.
1
<?php
8
namespace
LocalisationUpdate
;
9
13
class
ReaderFactory
{
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
}
LocalisationUpdate\JSONReader
Reads MediaWiki JSON i18n files.
Definition:
JSONReader.php:13
LocalisationUpdate
Definition:
Fetcher.php:8
LocalisationUpdate\ReaderFactory
Constructs readers for files based on the names.
Definition:
ReaderFactory.php:13
LocalisationUpdate\ReaderFactory\getReader
getReader( $filename)
Constructs a suitable reader for a given path.
Definition:
ReaderFactory.php:20
extensions
LocalisationUpdate
includes
reader
ReaderFactory.php
Generated on Thu Dec 19 2019 14:53:54 for MediaWiki by
1.8.16