Summary Files Commits Branches @commit @diff @stats
path: root / src / models / DBModel.php
blob: 859ea9701b613dd9ee43b1ecbc52746749725e9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
include_once("DB.php");

abstract class DBModel {
	/** 
	 * Used ONLY for gotten values form the database. Mustn't be assigned to, since it's AUTO_INCREMENT.
	 * The id column is set by default in the DB class.
	 */
	public int $id;

	protected static DB $DB;

	public static function __constructStatic() {
		self::$DB = new DB();
	}
}

DBModel::__constructStatic();