Skip to content

Commit 1fb6672

Browse files
committed
Merge branch 'v2' of github.com:ByteInternet/hypernode-deploy-configuration into new_configuration_api
2 parents da193fe + f9759ae commit 1fb6672

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"hipex/deploy-configuration": "*"
1717
},
1818
"require": {
19-
"deployer/deployer": "^6.8",
19+
"deployer/deployer": "^7.0",
2020
"psr/log": "^1.0"
2121
}
2222
}
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)