diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-02 21:34:17 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-02 21:34:17 +0200 |
commit | e231ba2ec1908f0ac914bd8f1b73771d707719b8 (patch) | |
tree | d26d6eddda7ee5c26c345f84804edb2592f6e395 /db | |
parent | 9c9625b0f6520f80996e17304805d8bae421f44c (diff) |
add custom app.json config and parser
Diffstat (limited to 'db')
-rw-r--r-- | db/mapperfactory.php | 8 |
1 files changed, 4 insertions, 4 deletions
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; |