MediaWiki REL1_32
FetcherFactory.php
Go to the documentation of this file.
1<?php
8namespace LocalisationUpdate;
9
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}
Constructs fetchers based on the repository urls.
Accesses file system directly.
This class uses GitHub api to obtain a list of files present in a directory to avoid fetching files t...
Fetches files over HTTP(s).