diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-10-31 15:28:37 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-10-31 15:28:37 +0100 |
commit | 26f88e043ebedcadd337011ce527f6148350f0dc (patch) | |
tree | b41d1c9dd646c35a2cac88ba999b0cdd35726a68 /w/class/controllerdb.php | |
parent | e17392e46259e6f2e012017987cf7c31c171488f (diff) | |
download | wcms-26f88e043ebedcadd337011ce527f6148350f0dc.tar.gz wcms-26f88e043ebedcadd337011ce527f6148350f0dc.zip |
homemade very root database engine
Diffstat (limited to 'w/class/controllerdb.php')
-rw-r--r-- | w/class/controllerdb.php | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/w/class/controllerdb.php b/w/class/controllerdb.php index 5d75d39..5952627 100644 --- a/w/class/controllerdb.php +++ b/w/class/controllerdb.php @@ -4,17 +4,47 @@ class Controllerdb extends Controller { protected $artmanager; + protected $database; + protected $artstore; - public function __construct() { + + public function __construct() + { parent::__construct(); + $this->artmanager = new Modelart(); + + } + + public function dbinit() + { + $this->database = new SleekDBw(__DIR__ . '/../../w_database', [ + 'auto_cache' => false + ]); + $this->artstore = $this->database->store(Config::arttable()); + + } + + + public function fetch() + { + $datas = $this->artstore->fetch(); + return $datas; + } + + public function desktop() + { - $this->artmanager = new Modelart(); + + $this->dbinit(); + var_dump( $this->fetch()); + } + // if (isset($_POST['actiondb'])) { // $app->setbdd($config); |