Added plugins and build tools

This commit is contained in:
2021-12-09 00:58:28 +01:00
parent a0d68a606c
commit eefe53a438
46 changed files with 4049 additions and 1 deletions

View File

@ -0,0 +1,37 @@
<?php
namespace SparkPlug\Com\Noccy\Docker\DockerCompose;
class Service
{
private array $service;
private array $environment = [];
private Stack|null $stack;
public function __construct(array $service, ?Stack $stack)
{
$this->service = $service;
$this->stack = $stack;
foreach ($this->service['environment']??[] as $k=>$v) {
if (is_numeric($k)) {
[$k, $v] = explode("=", $v, 2);
}
$this->environment[$k] = $v;
}
}
public function getImage():?String
{
return $this->service['image']??null;
}
public function getEnvironment(): array
{
return $this->environment;
}
}