aboutsummaryrefslogtreecommitdiff
path: root/w/class/controllerdb.php
diff options
context:
space:
mode:
Diffstat (limited to 'w/class/controllerdb.php')
-rw-r--r--w/class/controllerdb.php34
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);