Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / interwiki / InterwikiLookup.php
1 <?php
2 namespace MediaWiki\Interwiki;
3
4 /**
5 * Service interface for looking up Interwiki records.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * http://www.gnu.org/copyleft/gpl.html
21 *
22 * @file
23 */
24 use Interwiki;
25
26 /**
27 * Service interface for looking up Interwiki records.
28 *
29 * @since 1.28
30 */
31 interface InterwikiLookup {
32
33 /**
34 * Check whether an interwiki prefix exists
35 *
36 * @param string $prefix Interwiki prefix to use
37 * @return bool Whether it exists
38 */
39 public function isValidInterwiki( $prefix );
40
41 /**
42 * Fetch an Interwiki object
43 *
44 * @param string $prefix Interwiki prefix to use
45 * @return Interwiki|null|bool
46 */
47 public function fetch( $prefix );
48
49 /**
50 * Returns all interwiki prefixes
51 *
52 * @param string|null $local If set, limits output to local/non-local interwikis
53 * @return string[] List of prefixes
54 */
55 public function getAllPrefixes( $local = null );
56
57 /**
58 * Purge the in-process and persistent object cache for an interwiki prefix
59 * @param string $prefix
60 */
61 public function invalidateCache( $prefix );
62
63 }