Fix `Ui/Message/Manager.getPermission()` for permissions with dashes
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / IEditableObject.class.php
CommitLineData
11ade432
AE
1<?php
2namespace wcf\data;
3
4/**
5 * Abstract class for all data holder classes.
9f959ced 6 *
11ade432 7 * @author Marcel Werk
7b7b9764 8 * @copyright 2001-2019 WoltLab GmbH
11ade432 9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
e71525e4 10 * @package WoltLabSuite\Core\Data
11ade432 11 */
b522d4f1 12interface IEditableObject extends IStorableObject {
11ade432
AE
13 /**
14 * Creates a new object.
15 *
4e25add7
MS
16 * @param array $parameters
17 * @return IStorableObject
11ade432 18 */
058cbd6a 19 public static function create(array $parameters = []);
11ade432
AE
20
21 /**
22 * Updates this object.
23 *
4e25add7 24 * @param array $parameters
11ade432 25 */
058cbd6a 26 public function update(array $parameters = []);
11ade432 27
1321f0bd
MW
28 /**
29 * Updates the counters of this object.
30 *
4e25add7 31 * @param array $counters
1321f0bd 32 */
058cbd6a 33 public function updateCounters(array $counters = []);
1321f0bd 34
11ade432
AE
35 /**
36 * Deletes this object.
37 */
38 public function delete();
39
40 /**
7b1ee0de
MS
41 * Deletes all objects with the given ids and returns the number of deleted
42 * objects.
11ade432 43 *
4e25add7 44 * @param array $objectIDs
090b71e5 45 * @return int
11ade432 46 */
058cbd6a 47 public static function deleteAll(array $objectIDs = []);
11ade432 48}