Follow-up 6d4e1547: Hard-deprecate these functions
[lhc/web/wiklou.git] / includes / site / SiteStore.php
1 <?php
2
3 /**
4 * Interface for service objects providing a storage interface for Site objects.
5 *
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.
10 *
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.
15 *
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
20 *
21 * @since 1.21
22 *
23 * @file
24 * @ingroup Site
25 *
26 * @license GNU GPL v2+
27 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
28 */
29 interface SiteStore extends SiteLookup {
30
31 /**
32 * Saves the provided site.
33 *
34 * @since 1.21
35 *
36 * @param Site $site
37 *
38 * @return bool Success indicator
39 */
40 public function saveSite( Site $site );
41
42 /**
43 * Saves the provided sites.
44 *
45 * @since 1.21
46 *
47 * @param Site[] $sites
48 *
49 * @return bool Success indicator
50 */
51 public function saveSites( array $sites );
52
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.
56 */
57 public function clear();
58 }