From e231ba2ec1908f0ac914bd8f1b73771d707719b8 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 2 May 2014 21:34:17 +0200 Subject: add custom app.json config and parser --- db/mapperfactory.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db') diff --git a/db/mapperfactory.php b/db/mapperfactory.php index af2640a33..ff14042d0 100644 --- a/db/mapperfactory.php +++ b/db/mapperfactory.php @@ -20,16 +20,16 @@ use \OCA\News\Core\Db; class MapperFactory { - private $settings; + private $dbType; - public function __construct(IConfig $settings, Db $db) { - $this->settings = $settings; + public function __construct($dbType, Db $db) { + $this->dbType = $dbType; $this->db = $db; } public function getItemMapper() { - switch($this->settings->getSystemValue('dbtype')) { + switch($this->dbType) { case 'pgsql': return new \OCA\News\Db\Postgres\ItemMapper($this->db); break; -- cgit v1.2.3