mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
create contextmanager and refactor docgeneratorTemplateType
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user