MediaWiki REL1_33
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}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
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).