| 1 | <?php |
| 2 | |
| 3 | namespace wcf\data; |
| 4 | |
| 5 | /** |
| 6 | * Abstract class for all data holder classes. |
| 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 | */ |
| 12 | interface IEditableObject extends IStorableObject |
| 13 | { |
| 14 | /** |
| 15 | * Creates a new object. |
| 16 | * |
| 17 | * @param array $parameters |
| 18 | * @return IStorableObject |
| 19 | */ |
| 20 | public static function create(array $parameters = []); |
| 21 | |
| 22 | /** |
| 23 | * Updates this object. |
| 24 | * |
| 25 | * @param array $parameters |
| 26 | */ |
| 27 | public function update(array $parameters = []); |
| 28 | |
| 29 | /** |
| 30 | * Updates the counters of this object. |
| 31 | * |
| 32 | * @param array $counters |
| 33 | */ |
| 34 | public function updateCounters(array $counters = []); |
| 35 | |
| 36 | /** |
| 37 | * Deletes this object. |
| 38 | */ |
| 39 | public function delete(); |
| 40 | |
| 41 | /** |
| 42 | * Deletes all objects with the given ids and returns the number of deleted |
| 43 | * objects. |
| 44 | * |
| 45 | * @param array $objectIDs |
| 46 | * @return int |
| 47 | */ |
| 48 | public static function deleteAll(array $objectIDs = []); |
| 49 | } |