summaryrefslogtreecommitdiff
path: root/src/Module
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2021-04-20 12:45:44 +0200
committerDaniel Weipert <code@drogueronin.de>2021-04-20 12:45:44 +0200
commitf7fc6fd54a5f750de8144b9b05d5ac173470c70a (patch)
tree8796fc49df1d9d80c7b8817a54580c98c2f100f5 /src/Module
parent3983548e7c0f107fa7b7cc3c4c36aa009590b481 (diff)
Adds Connection wrapper for SSH2
Diffstat (limited to 'src/Module')
-rw-r--r--src/Module/Module.php14
-rw-r--r--src/Module/State.php2
2 files changed, 15 insertions, 1 deletions
diff --git a/src/Module/Module.php b/src/Module/Module.php
index 51672f9..48ba5f9 100644
--- a/src/Module/Module.php
+++ b/src/Module/Module.php
@@ -3,4 +3,16 @@
namespace PHPIAC\Module;
abstract class Module implements ModuleInterface
-{}
+{
+ /**
+ * Module constructor.
+ *
+ * @param array $config
+ */
+ public function __construct(array $config)
+ {
+ foreach ($config as $key => $value) {
+ $this->$key = $value;
+ }
+ }
+}
diff --git a/src/Module/State.php b/src/Module/State.php
index c7f7af9..040b91e 100644
--- a/src/Module/State.php
+++ b/src/Module/State.php
@@ -6,4 +6,6 @@ class State
{
public const PRESENT = 'present';
public const ABSENT = 'absent';
+ public const ENABLED = 'enabled';
+ public const DISABLED = 'disabled';
}