Initial commit

This commit is contained in:
Frank Schubert
2021-03-29 23:04:42 +02:00
commit 4ea4927931
3737 changed files with 709905 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
class mfUser extends mfBaseModel {
private static $instance;
public $data;
public function __construct() {
$this->db=FronkDB::singleton();
$this->log=mfLoghandler::singleton();
if(defined("MFMODEL_USEFIELDPREFIX") && MFMODEL_USEFIELDPREFIX==true) {
$this->table=get_class($this);
}
if(method_exists($this, "init")) {
$this->init($_);
}
if(is_numeric($_)) {
$this->fetch($_);
} elseif(is_object($_)) {
$this->load($_);
}
}
protected function init($user) {
$this->table="user";
}
public static function singleton($user=null) {
if(!isset(self::$instance)) {
$c=__CLASS__;
self::$instance=new $c($user);
}
return self::$instance;
}
}