Move remaining LoadBalancer classes to Rdbms
[mediawiki.git] / includes / site / SiteStore.php
blob10e0c1b93da285fd6100eb385d93b99547e347f0
1 <?php
3 /**
4 * Interface for service objects providing a storage interface for Site objects.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * http://www.gnu.org/copyleft/gpl.html
21 * @since 1.21
23 * @file
24 * @ingroup Site
26 * @license GNU GPL v2+
27 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
29 interface SiteStore extends SiteLookup {
31 /**
32 * Saves the provided site.
34 * @since 1.21
36 * @param Site $site
38 * @return bool Success indicator
40 public function saveSite( Site $site );
42 /**
43 * Saves the provided sites.
45 * @since 1.21
47 * @param Site[] $sites
49 * @return bool Success indicator
51 public function saveSites( array $sites );
53 /**
54 * Deletes all sites from the database. After calling clear(), getSites() will return an empty
55 * list and getSite() will return null until saveSite() or saveSites() is called.
57 public function clear();