Merge branch '3.0' into 3.1
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / IStorableObject.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-2018 WoltLab GmbH
9 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
10 * @package WoltLabSuite\Core\Data
11 */
12 interface IStorableObject {
13 /**
14 * Returns the value of a object data variable with the given name or `null` if no
15 * such data variable exists.
16 *
17 * @param string $name
18 * @return mixed
19 */
20 public function __get($name);
21
22 /**
23 * Determines if the object data variable with the given name is set and
24 * is not NULL.
25 *
26 * @param string $name
27 * @return boolean
28 */
29 public function __isset($name);
30
31 /**
32 * Returns the value of all object data variables.
33 *
34 * @deprecated This method was introduced for a function in AJAXProxy that is deprecated.
35 * @return mixed[]
36 */
37 public function getData();
38
39 /**
40 * Returns the name of the database table.
41 *
42 * @return string
43 */
44 public static function getDatabaseTableName();
45
46 /**
47 * Returns the alias of the database table.
48 *
49 * @return string
50 */
51 public static function getDatabaseTableAlias();
52
53 /**
54 * Returns true if database table index is an identity column.
55 *
56 * @return boolean
57 */
58 public static function getDatabaseTableIndexIsIdentity();
59
60 /**
61 * Returns the name of the database table index.
62 *
63 * @return string
64 */
65 public static function getDatabaseTableIndexName();
66 }