aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Extension.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-05 14:17:02 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-12-05 14:17:02 +0100
commit9fc60317eecba785b66011f04b9a5150296f2df6 (patch)
tree992516f332a1fde1dc0c25da670c3df0fadef07b /lib/Minz/Extension.php
parenta2da70fd119cc43438f8dd88de54a7d19fafbe1a (diff)
First draft for listing and manipulate extensions
See https://github.com/FreshRSS/FreshRSS/issues/252
Diffstat (limited to 'lib/Minz/Extension.php')
-rw-r--r--lib/Minz/Extension.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php
index ecf510ea2..a1fdd659b 100644
--- a/lib/Minz/Extension.php
+++ b/lib/Minz/Extension.php
@@ -17,6 +17,8 @@ class Minz_Extension {
'user',
);
+ private $is_enabled;
+
/**
* The constructor to assign specific information to the extension.
*
@@ -41,6 +43,8 @@ class Minz_Extension {
$this->description = isset($meta_info['description']) ? $meta_info['description'] : '';
$this->version = isset($meta_info['version']) ? $meta_info['version'] : '0.1';
$this->setType(isset($meta_info['type']) ? $meta_info['type'] : 'user');
+
+ $this->is_enabled = false;
}
/**
@@ -67,6 +71,22 @@ class Minz_Extension {
public function init() {}
/**
+ * Set the current extension to enable.
+ */
+ public function enable() {
+ $this->is_enabled = true;
+ }
+
+ /**
+ * Return if the extension is currently enabled.
+ *
+ * @return true if extension is enabled, false else.
+ */
+ public function is_enabled() {
+ return $this->is_enabled;
+ }
+
+ /**
* Getters and setters.
*/
public function getName() {