mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
fix container not loading config
This commit is contained in:
parent
fa5b41c26d
commit
d513495b3b
@ -34,6 +34,8 @@ class ContainerHolder
|
||||
|
||||
private static function buildContainer(): Container
|
||||
{
|
||||
self::loadConfig();
|
||||
|
||||
$builder = new ContainerBuilder();
|
||||
$builder->addDefinitions(
|
||||
new AliasDefinitionSource(),
|
||||
@ -61,6 +63,9 @@ class ContainerHolder
|
||||
|
||||
private static function loadConfig(): void
|
||||
{
|
||||
if (self::$config) {
|
||||
return;
|
||||
}
|
||||
self::$config = require Kernel::getInstance()->getConfigDir() . '/container.php';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user