Update git submodules
[mediawiki.git] / includes / site / SiteStore.php
blobb2477a6d9576789efc5d42ce3e143c3e4572dd45
1 <?php
2 /**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
18 * @file
21 /**
22 * Interface for storing and retrieving Site objects.
24 * Default implementation is DBSiteStore.
26 * @since 1.21
27 * @ingroup Site
28 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
30 interface SiteStore extends SiteLookup {
32 /**
33 * Saves the provided site.
35 * @since 1.21
36 * @param Site $site
37 * @return bool Success indicator
39 public function saveSite( Site $site );
41 /**
42 * Saves the provided sites.
44 * @since 1.21
45 * @param Site[] $sites
46 * @return bool Success indicator
48 public function saveSites( array $sites );
50 /**
51 * Deletes all sites from the database. After calling clear(), getSites() will return an empty
52 * list and getSite() will return null until saveSite() or saveSites() is called.
54 public function clear();