create contextmanager and refactor docgeneratorTemplateType

This commit is contained in:
2021-11-30 18:35:05 +01:00
parent 0710d6572b
commit 3404d3669c
8 changed files with 132 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace Chill\DocGeneratorBundle\Context;
class ContextManager
{
private iterable $contexts;
/**
* @param iterable $contexts
*/
public function __construct(iterable $contexts)
{
$this->contexts = $contexts;
}
public function getContext(): array
{
return iterator_to_array($this->contexts);
}
}