diff options
| author | 2014-12-05 14:17:02 +0100 | |
|---|---|---|
| committer | 2014-12-05 14:17:02 +0100 | |
| commit | 9fc60317eecba785b66011f04b9a5150296f2df6 (patch) | |
| tree | 992516f332a1fde1dc0c25da670c3df0fadef07b /lib/Minz/ExtensionManager.php | |
| parent | a2da70fd119cc43438f8dd88de54a7d19fafbe1a (diff) | |
First draft for listing and manipulate extensions
See https://github.com/FreshRSS/FreshRSS/issues/252
Diffstat (limited to 'lib/Minz/ExtensionManager.php')
| -rw-r--r-- | lib/Minz/ExtensionManager.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index 789557b9e..6c32ccf19 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -144,6 +144,7 @@ class Minz_ExtensionManager { if (isset(self::$ext_list[$ext_name])) { $ext = self::$ext_list[$ext_name]; self::$ext_list_enabled[$ext_name] = $ext; + $ext->enable(); $ext->init(); } } @@ -158,4 +159,20 @@ class Minz_ExtensionManager { self::enable($ext_name); } } + + + + /** + * Returns a list of extensions. + * + * @param $only_enabled if true returns only the enabled extensions (false by default). + * @return an array of extensions. + */ + public static function list_extensions($only_enabled = false) { + if ($only_enabled) { + return self::$ext_list_enabled; + } else { + return self::$ext_list; + } + } } |
