mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-29 23:10:08 +00:00
allow to set aio_variables from containers.json
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
19
php/src/Container/AioVariables.php
Normal file
19
php/src/Container/AioVariables.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace AIO\Container;
|
||||
|
||||
class AioVariables {
|
||||
/** @var string[] */
|
||||
private array $variables = [];
|
||||
|
||||
public function AddVariable(string $variable) : void {
|
||||
$this->variables[] = $variable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function GetVariables() : array {
|
||||
return $this->variables;
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,7 @@ class Container {
|
||||
private array $tmpfs;
|
||||
private bool $init;
|
||||
private string $imageTag;
|
||||
private AioVariables $aioVariables;
|
||||
private DockerActionManager $dockerActionManager;
|
||||
|
||||
public function __construct(
|
||||
@@ -58,6 +59,7 @@ class Container {
|
||||
array $tmpfs,
|
||||
bool $init,
|
||||
string $imageTag,
|
||||
AioVariables $aioVariables,
|
||||
DockerActionManager $dockerActionManager
|
||||
) {
|
||||
$this->identifier = $identifier;
|
||||
@@ -81,6 +83,7 @@ class Container {
|
||||
$this->tmpfs = $tmpfs;
|
||||
$this->init = $init;
|
||||
$this->imageTag = $imageTag;
|
||||
$this->aioVariables = $aioVariables;
|
||||
$this->dockerActionManager = $dockerActionManager;
|
||||
}
|
||||
|
||||
@@ -186,4 +189,8 @@ class Container {
|
||||
public function GetEnvironmentVariables() : ContainerEnvironmentVariables {
|
||||
return $this->containerEnvironmentVariables;
|
||||
}
|
||||
|
||||
public function GetAioVariables() : AioVariables {
|
||||
return $this->aioVariables;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user