Total Complexity | 6 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ExecutionContext extends LoggerContext |
||
11 | { |
||
12 | protected array $parameters; |
||
13 | |||
14 | protected FileSystemInterface $fileSystem; |
||
15 | |||
16 | /** |
||
17 | * @param array $parameters |
||
18 | * @param FileSystemInterface $fileSystem |
||
19 | */ |
||
20 | public function __construct(array $parameters, FileSystemInterface $fileSystem) |
||
21 | { |
||
22 | $this->parameters = $parameters; |
||
23 | $this->fileSystem = $fileSystem; |
||
24 | } |
||
25 | |||
26 | |||
27 | public function getLoggerContext(array $additionalContextData): array |
||
28 | { |
||
29 | return $additionalContextData + $this->loggerContext; |
||
30 | } |
||
31 | |||
32 | public function getParameters(): array |
||
33 | { |
||
34 | return $this->parameters; |
||
35 | } |
||
36 | |||
37 | public function getParameter(string $key, $default = null, string $separator = ".") |
||
38 | { |
||
39 | return AssociativeArray::getFromKey($this->parameters, $key, $default, $separator); |
||
40 | } |
||
41 | |||
42 | public function setParameter(string $key, $value, string $separator = "."): void |
||
45 | } |
||
46 | |||
47 | public function getFileSystem(): FileSystemInterface |
||
50 | } |
||
51 | |||
52 | |||
53 | |||
54 | } |