diff options
Diffstat (limited to 'app/Models/Factory.php')
| -rw-r--r-- | app/Models/Factory.php | 13 |
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(); + } + } +} |
