Commit | Line | Data |
---|---|---|
11ade432 | 1 | <?php |
a9229942 | 2 | |
11ade432 AE |
3 | namespace wcf\data; |
4 | ||
5 | /** | |
6 | * Abstract class for all data holder classes. | |
a9229942 TD |
7 | * |
8 | * @author Marcel Werk | |
9 | * @copyright 2001-2019 WoltLab GmbH | |
10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> | |
11 | * @package WoltLabSuite\Core\Data | |
11ade432 | 12 | */ |
a9229942 TD |
13 | interface IEditableObject extends IStorableObject |
14 | { | |
15 | /** | |
16 | * Creates a new object. | |
17 | * | |
18 | * @param array $parameters | |
19 | * @return IStorableObject | |
20 | */ | |
21 | public static function create(array $parameters = []); | |
22 | ||
23 | /** | |
24 | * Updates this object. | |
25 | * | |
26 | * @param array $parameters | |
27 | */ | |
28 | public function update(array $parameters = []); | |
29 | ||
30 | /** | |
31 | * Updates the counters of this object. | |
32 | * | |
33 | * @param array $counters | |
34 | */ | |
35 | public function updateCounters(array $counters = []); | |
36 | ||
37 | /** | |
38 | * Deletes this object. | |
39 | */ | |
40 | public function delete(); | |
41 | ||
42 | /** | |
43 | * Deletes all objects with the given ids and returns the number of deleted | |
44 | * objects. | |
45 | * | |
46 | * @param array $objectIDs | |
47 | * @return int | |
48 | */ | |
49 | public static function deleteAll(array $objectIDs = []); | |
11ade432 | 50 | } |