This commit is contained in:
xl
2023-11-16 21:00:34 +08:00
parent 6cd9377866
commit 06e2b8a380
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -83,6 +83,7 @@ abstract class BaseApplication extends Component
/**
* @param ConfigProvider $config
* @return void
* @throws Exception
*/
public function mapping(ConfigProvider $config): void
{
@@ -90,9 +91,8 @@ abstract class BaseApplication extends Component
foreach ($config->get('mapping', []) as $interface => $class) {
$this->container->set($interface, $class);
}
foreach ($config->get('components', []) as $id => $component) {
$this->localService->set($id, $component);
$this->localService->set($id, Kiri::createObject($component));
}
}