Total Complexity | 6 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Micro\Plugin\Twig\Business\Loader; |
||
13 | |||
14 | use Micro\Framework\Kernel\KernelInterface; |
||
15 | use Twig\Environment; |
||
16 | use Twig\Error\Error; |
||
17 | use Twig\Error\LoaderError; |
||
18 | |||
19 | readonly class LoaderProcessor implements LoaderProcessorInterface |
||
|
|||
20 | { |
||
21 | /** |
||
22 | * @param LoaderInterface[] $loaders |
||
23 | */ |
||
24 | 2 | public function __construct( |
|
25 | private KernelInterface $appKernel, |
||
26 | private iterable $loaders |
||
27 | ) { |
||
28 | 2 | } |
|
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | 1 | public function load(Environment $environment): void |
|
34 | { |
||
35 | 1 | foreach ($this->appKernel->plugins() as $plugin) { |
|
36 | 1 | $this->process($environment, $plugin); |
|
37 | } |
||
51 |