Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
17 | final class Injector |
||
18 | { |
||
19 | /** @codeCoverageIgnore */ |
||
20 | private function __construct() |
||
21 | { |
||
22 | } |
||
23 | |||
24 | public static function getInstance(string $appName, string $context, string $appDir, CacheInterface|null $cache = null): InjectorInterface |
||
25 | { |
||
26 | $meta = new Meta($appName, $context, $appDir); |
||
27 | $cacheNamespace = str_replace('\\', '_', $appName) . $context; |
||
28 | $cache ??= (new LocalCacheProvider($meta->tmpDir . '/injector', $cacheNamespace))->get(); |
||
29 | |||
30 | return PackageInjector::getInstance($meta, $context, $cache); |
||
31 | } |
||
32 | |||
33 | public static function getOverrideInstance(string $appName, string $context, string $appDir, AbstractModule $overrideModule): InjectorInterface |
||
36 | } |
||
37 | } |
||
38 |