MediaWiki
REL1_32
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\FetcherFactory\getFetcher
getFetcher( $path)
Definition
FetcherFactory.php:14
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\HttpFetcher
Fetches files over HTTP(s).
Definition
HttpFetcher.php:13
LocalisationUpdate
Definition
Fetcher.php:8
extensions
LocalisationUpdate
includes
fetcher
FetcherFactory.php
Generated on Mon Nov 25 2024 15:56:36 for MediaWiki by
1.10.0