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