Skip to content

Commit 54076af

Browse files
feat: HypernodeSettingConfiguration class
1 parent e480820 commit 54076af

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
namespace Hypernode\DeployConfiguration\PlatformConfiguration;
4+
5+
use Hypernode\DeployConfiguration\ServerRole;
6+
use Hypernode\DeployConfiguration\ServerRoleConfigurableInterface;
7+
use Hypernode\DeployConfiguration\ServerRoleConfigurableTrait;
8+
use Hypernode\DeployConfiguration\StageConfigurableInterface;
9+
use Hypernode\DeployConfiguration\StageConfigurableTrait;
10+
use Hypernode\DeployConfiguration\TaskConfigurationInterface;
11+
12+
/**
13+
* Sets the attribute/value via hypernode-systemctl
14+
*/
15+
class HypernodeSettingConfiguration implements
16+
TaskConfigurationInterface,
17+
ServerRoleConfigurableInterface,
18+
StageConfigurableInterface
19+
{
20+
use ServerRoleConfigurableTrait;
21+
22+
use StageConfigurableTrait;
23+
24+
/**
25+
* @var string
26+
*/
27+
private $attribute;
28+
29+
/**
30+
* @var string
31+
*/
32+
private $value;
33+
34+
/**
35+
* @param string $attribute Name of the attribute to set (like 'php_version')
36+
* @param string $value Value of the attribute to set (like '8.1')
37+
*/
38+
public function __construct(string $attribute, string $value)
39+
{
40+
$this->attribute = $attribute;
41+
$this->value = $value;
42+
}
43+
44+
public function getAttribute(): string
45+
{
46+
return $this->attribute;
47+
}
48+
49+
public function getValue(): string
50+
{
51+
return $this->value;
52+
}
53+
}

0 commit comments

Comments
 (0)