Added generic update counters method
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / IEditableObject.class.php
1 <?php
2 namespace wcf\data;
3
4 /**
5 * Abstract class for all data holder classes.
6 *
7 * @author Marcel Werk
8 * @copyright 2001-2010 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package com.woltlab.wcf
11 * @subpackage data
12 * @category Community Framework
13 */
14 interface IEditableObject extends IStorableObject {
15 /**
16 * Creates a new object.
17 *
18 * @param array $parameters
19 * @return wcf\data\IStorableObject
20 */
21 public static function create(array $parameters = array());
22
23 /**
24 * Updates this object.
25 *
26 * @param array $parameters
27 */
28 public function update(array $parameters = array());
29
30 /**
31 * Updates the counters of this object.
32 *
33 * @param array $counters
34 */
35 public function updateCounters(array $counters = array());
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 integer
48 */
49 public static function deleteAll(array $objectIDs = array());
50 }