public function __construct(MySQLConnect $mysql = null, $data = null, $table = null, $id = null, $autocreate = true) { parent::__construct($data); $this->mysql = $mysql; $this->table = $table ? $table : $this->getTableName(); $this->id = $id; $this->autocreate = $autocreate; $this->uid = Session::get('User')->id; }