MediaWiki
1.34.0
FetcherFactory.php
Go to the documentation of this file.
1
<?php
8
namespace
LocalisationUpdate
;
9
13
class
FetcherFactory
{
14
public
function
getFetcher
(
$path
) {
15
if
( strpos(
$path
,
'https://raw.github.com/'
) === 0 ) {
16
return
new
GitHubFetcher
();
17
} elseif ( strpos(
$path
,
'http://'
) === 0 ) {
18
return
new
HttpFetcher
();
19
} elseif ( strpos(
$path
,
'https://'
) === 0 ) {
20
return
new
HttpFetcher
();
21
}
else
{
22
return
new
FileSystemFetcher
();
23
}
24
}
25
}
LocalisationUpdate\FetcherFactory
Constructs fetchers based on the repository urls.
Definition:
FetcherFactory.php:13
LocalisationUpdate\FileSystemFetcher
Accesses file system directly.
Definition:
FileSystemFetcher.php:13
LocalisationUpdate\GitHubFetcher
This class uses GitHub api to obtain a list of files present in a directory to avoid fetching files t...
Definition:
GitHubFetcher.php:18
LocalisationUpdate\FetcherFactory\getFetcher
getFetcher( $path)
Definition:
FetcherFactory.php:14
LocalisationUpdate\HttpFetcher
Fetches files over HTTP(s).
Definition:
HttpFetcher.php:13
LocalisationUpdate
Definition:
Fetcher.php:8
$path
$path
Definition:
NoLocalSettings.php:25
extensions
LocalisationUpdate
includes
fetcher
FetcherFactory.php
Generated on Thu Dec 19 2019 14:53:54 for MediaWiki by
1.8.16