MediaWiki
REL1_34
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\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
LocalisationUpdate
Definition
Fetcher.php:8
extensions
LocalisationUpdate
includes
reader
ReaderFactory.php
Generated on Mon Nov 25 2024 16:04:38 for MediaWiki by
1.10.0