diff options
Diffstat (limited to 'app/Models/Factory.php')
| -rw-r--r-- | app/Models/Factory.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Models/Factory.php b/app/Models/Factory.php index 764987c46..1accb491c 100644 --- a/app/Models/Factory.php +++ b/app/Models/Factory.php @@ -2,6 +2,10 @@ class FreshRSS_Factory { + public static function createCategoryDao($username = null) { + return new FreshRSS_CategoryDAO($username); + } + public static function createFeedDao($username = null) { $conf = Minz_Configuration::get('system'); switch ($conf->db['type']) { @@ -24,6 +28,18 @@ class FreshRSS_Factory { } } + public static function createTagDao($username = null) { + $conf = Minz_Configuration::get('system'); + switch ($conf->db['type']) { + case 'sqlite': + return new FreshRSS_TagDAOSQLite($username); + case 'pgsql': + return new FreshRSS_TagDAOPGSQL($username); + default: + return new FreshRSS_TagDAO($username); + } + } + public static function createStatsDAO($username = null) { $conf = Minz_Configuration::get('system'); switch ($conf->db['type']) { |
