Skip to content
Snippets Groups Projects
Verified Commit 9786f20f authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

refactor: reorder definition loading, change config key name

parent de695980
No related branches found
No related tags found
3 merge requests!3improve into wp-hook and some additional unfinished things,!21.x,!1Draft: Basic implementation of plugin initializer
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
...@@ -102,8 +102,10 @@ final class PluginInit { ...@@ -102,8 +102,10 @@ final class PluginInit {
private function initialize_container( Plugin $plugin ): Container { private function initialize_container( Plugin $plugin ): Container {
$original_builder = new DiBuilder(); $original_builder = new DiBuilder();
$builder = new ContainerBuilder( $original_builder ); $builder = new ContainerBuilder( $original_builder );
$builder->add_definitions( $this->config->get( 'container_definitions', [] ) ); $builder->add_definitions(
$builder->add_definitions( __DIR__ . '/Resources/services.inc.php' ); __DIR__ . '/Resources/services.inc.php',
$this->config->get( 'services', [] )
);
return $builder->build(); return $builder->build();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment