Skip to content
Snippets Groups Projects
Select Git revision
  • 814a3be0146cdc1ebe1a9a57e332eb3ebe269569
  • master default protected
  • feat/npm-publish
  • feat/demo-deploy
  • change-demo-deploy
  • remove-smoke
  • feat/acceptance-tests
  • feature/deploy-composer.json
  • feature/mysql-bin-logs
  • skip-codecept-for-libs
  • include-composer-json
  • exclude-wp-assets
  • update_codecept_image
  • fix/silenced-copy
  • remove-free-translations
  • codeception-with-optional-step
  • improve-parallelization
  • linter-exit
  • change-images
  • fix/linter
  • globally-raise-mem-limit
  • no-symlink2
22 results

integration.yml

Blame
  • HookableBinder.php 642 B
    <?php
    
    declare(strict_types=1);
    
    namespace WPDesk\Init\Binding\Binder;
    
    use Psr\Container\ContainerInterface;
    use WPDesk\Init\Binding\ComposableBinder;
    use WPDesk\Init\Binding\Definition;
    use WPDesk\Init\Binding\Definition\HookableDefinition;
    
    class HookableBinder implements ComposableBinder {
    
    	/** @var ContainerInterface */
    	private $container;
    
    	public function __construct( ContainerInterface $c ) {
    		$this->container = $c;
    	}
    
    	public function can_bind( Definition $def ): bool {
    		return $def instanceof HookableDefinition;
    	}
    
    	public function bind( Definition $def ): void {
    		$this->container->get( $def->value() )->hooks();
    	}
    }