diff options
Diffstat (limited to 'app/Models/Factory.php')
| -rw-r--r-- | app/Models/Factory.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php index 1accb491c..69885c205 100644 --- a/app/Models/Factory.php +++ b/app/Models/Factory.php @@ -2,8 +2,18 @@ class FreshRSS_Factory { + public static function createUserDao($username = null) { + return new FreshRSS_UserDAO($username); + } + public static function createCategoryDao($username = null) { - return new FreshRSS_CategoryDAO($username); + $conf = Minz_Configuration::get('system'); + switch ($conf->db['type']) { + case 'sqlite': + return new FreshRSS_CategoryDAOSQLite($username); + default: + return new FreshRSS_CategoryDAO($username); + } } public static function createFeedDao($username = null) { |
