From e8566a57cf1b9cc2eed10429f27840d17da945ef Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 23 Dec 2018 18:20:57 +0100 Subject: feature users --- app/class/modeldb.php | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'app/class/modeldb.php') diff --git a/app/class/modeldb.php b/app/class/modeldb.php index bc2a0c7..ef1d351 100644 --- a/app/class/modeldb.php +++ b/app/class/modeldb.php @@ -1,10 +1,9 @@ "\WFlywheel\Query", 'formatter' => new \WFlywheel\Formatter\JSON, ]); - $this->artstore = new \WFlywheel\Repository(Config::arttable(), $this->database); } - - public function getlister() + public function storeinit(string $repo) { - $artlist = []; - $list = $this->artstore->findAll(); - foreach ($list as $artdata) { - $artlist[$artdata->id] = new Art2($artdata); - } - return $artlist; + $this->repo = new \WFlywheel\Repository($repo, $this->database); } public function list() { - return $this->artstore->getAllIds(); + return $this->repo->getAllIds(); } - public function getlisterid(array $idlist = []) - { - $artdatalist = $this->artstore->query() - ->where('__id', 'IN', $idlist) - ->execute(); - - $artlist = []; - foreach ($artdatalist as $id => $artdata) { - $artlist[$id] = new Art2($artdata); - } - return $artlist; - } + -- cgit v1.2.3