aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-20 11:54:31 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-20 11:54:31 +0200
commit7080a32650ab8b19e917d8add944a75cc98381bc (patch)
treea06593be4c12fcb21566c0d249af3ee63d8429df /app/Models/Factory.php
parent3bad4d138e5c4a86aa3f88dea3787c3335861ce4 (diff)
Add checking installation feature
Diffstat (limited to 'app/Models/Factory.php')
-rw-r--r--app/Models/Factory.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php
index 93f4552f7..91cb84998 100644
--- a/app/Models/Factory.php
+++ b/app/Models/Factory.php
@@ -29,4 +29,13 @@ class FreshRSS_Factory {
}
}
+ public static function createDatabaseDAO($username = null) {
+ $db = Minz_Configuration::dataBase();
+ if ($db['type'] === 'sqlite') {
+ return new FreshRSS_DatabaseDAOSQLite($username);
+ } else {
+ return new FreshRSS_DatabaseDAO($username);
+ }
+ }
+
}