aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Factory.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-03 21:26:30 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-07-03 21:26:30 +0200
commitd6f414108667f32fe2b480adeb7ec9c218db2f4a (patch)
treec2d9ff851776ebcd49242b2fb15456cc13be089e /app/Models/Factory.php
parent8a5050289ef695dc4d388eecee692ad9d83e00ce (diff)
Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
Diffstat (limited to 'app/Models/Factory.php')
-rw-r--r--app/Models/Factory.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php
new file mode 100644
index 000000000..bea89c114
--- /dev/null
+++ b/app/Models/Factory.php
@@ -0,0 +1,13 @@
+<?php
+
+class FreshRSS_Factory {
+
+ public static function createEntryDao() {
+ $db = Minz_Configuration::dataBase();
+ if ($db['type'] === 'sqlite') {
+ return new FreshRSS_EntryDAO_SQLite();
+ } else {
+ return new FreshRSS_EntryDAO();
+ }
+ }
+}