| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class ContextManager |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var ContextInterface[] |
||
| 20 | */ |
||
| 21 | protected $contexts; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param ContextInterface[] $contexts |
||
| 25 | */ |
||
| 26 | public function __construct(array $contexts = []) |
||
| 27 | { |
||
| 28 | $this->contexts = []; |
||
| 29 | |||
| 30 | foreach($contexts as $context) { |
||
| 31 | $this->addContext($context); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | public function addContext(ContextInterface $builder): void |
||
| 38 | } |
||
| 39 | |||
| 40 | public function createContext(string $route, Element $element): ?ContextInterface |
||
| 50 | } |
||
| 51 | } |
||
| 52 |