Merge branch '3.1' into 5.2
[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-2019 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 * @return mixed[]
35 */
36 public function getData();
37
38 /**
39 * Returns the name of the database table.
40 *
41 * @return string
42 */
43 public static function getDatabaseTableName();
44
45 /**
46 * Returns the alias of the database table.
47 *
48 * @return string
49 */
50 public static function getDatabaseTableAlias();
51
52 /**
53 * Returns true if database table index is an identity column.
54 *
55 * @return boolean
56 */
57 public static function getDatabaseTableIndexIsIdentity();
58
59 /**
60 * Returns the name of the database table index.
61 *
62 * @return string
63 */
64 public static function getDatabaseTableIndexName();
65 }