]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - extensions/LocalisationUpdate/fetcher/Fetcher.php
MediaWiki 1.30.2-scripts2
[autoinstalls/mediawiki.git] / extensions / LocalisationUpdate / fetcher / Fetcher.php
1 <?php
2 /**
3  * @file
4  * @author Niklas Laxström
5  * @license GPL-2.0+
6  */
7
8 namespace LocalisationUpdate;
9
10 /**
11  * Interface for classes which fetch files over different protocols and ways.
12  */
13 interface Fetcher {
14         /**
15          * Fetches a single resource.
16          *
17          * @return bool|string False on failure.
18          */
19         public function fetchFile( $url );
20
21         /**
22          * Fetch a list of resources. This has the benefit of being able to pick up
23          * new languages as they appear if languages are stored in separate files.
24          *
25          * @return array
26          */
27         public function fetchDirectory( $pattern );
28 }