diff --git a/src/HookDriver/HookableBundle.php b/src/HookDriver/HookableBundle.php deleted file mode 100644 index 7787f6713934b7e32f8f5cb8dfd552e9ba4551ec..0000000000000000000000000000000000000000 --- a/src/HookDriver/HookableBundle.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -declare( strict_types=1 ); - -namespace WPDesk\Init\HookDriver; - -interface HookableBundle extends \WPDesk\Init\Bundle\Bundle { - - public static function hookable(): array; - -} \ No newline at end of file diff --git a/src/HookDriver/HookableDriver.php b/src/HookDriver/HookableDriver.php deleted file mode 100644 index 6849ca58e83c663944a061bd877699ec8a8bb947..0000000000000000000000000000000000000000 --- a/src/HookDriver/HookableDriver.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -declare( strict_types=1 ); - -namespace WPDesk\Init\HookDriver; - -use Psr\Container\ContainerInterface; -use WPDesk\Init\Configuration\ReadableConfig; - -class HookableDriver implements HookDriver { - - public function register_hooks( ReadableConfig $config, array $bundles, ContainerInterface $container ): void { - $subscribers = $config->get( 'hookables', [] ); - - foreach ( $bundles as $bundle ) { - $subscribers = \array_merge( $subscribers, $bundle::hookable() ); - } - - foreach ( $subscribers as $subscriber ) { - $container->get( $subscriber )->hooks(); - } - } - -} \ No newline at end of file