From f7fc6fd54a5f750de8144b9b05d5ac173470c70a Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 20 Apr 2021 12:45:44 +0200 Subject: Adds Connection wrapper for SSH2 --- src/Module/Module.php | 14 +++++++++++++- src/Module/State.php | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/Module') 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'; } -- cgit v1.2.3