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

refactor: simplify definitions loader instantation

parent 6a09ab5c
No related branches found
No related tags found
2 merge requests!3improve into wp-hook and some additional unfinished things,!21.x
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
......@@ -5,22 +5,16 @@ declare(strict_types=1);
namespace WPDesk\Init\Extension;
use Psr\Container\ContainerInterface;
use WPDesk\Init\Binding\DefinitionFactory;
use WPDesk\Init\Binding\Loader\BindingDefinitions;
use WPDesk\Init\Binding\Loader\FilesystemDefinitions;
use WPDesk\Init\Configuration\ReadableConfig;
use WPDesk\Init\DependencyInjection\ContainerBuilder;
use WPDesk\Init\Loader\PhpFileLoader;
use WPDesk\Init\Plugin\Plugin;
class BuiltinExtension implements Extension {
public function bindings( ContainerInterface $c ): BindingDefinitions {
return new FilesystemDefinitions(
__DIR__ . '/../Resources/bindings',
new PhpFileLoader(),
new DefinitionFactory()
);
return new FilesystemDefinitions( __DIR__ . '/../Resources/bindings' );
}
public function build( ContainerBuilder $builder, Plugin $plugin, ReadableConfig $config ): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment