2017 © Pedro Peláez
 

library event-bus-bundle

Event Bus Bundle

image

innmind/event-bus-bundle

Event Bus Bundle

  • Sunday, February 12, 2017
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 103 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

EventBusBundle

master develop
Scrutinizer Code Quality Scrutinizer Code Quality
Code Coverage Code Coverage
Build Status Build Status

Symfony integration of innmind/event-bus that ease stacking event buses., (*1)

Installation

composer require innmind/event-bus-bundle

In your AppKernel.php add the following line:, (*2)

//app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Innmind\EventBusBundle\InnmindEventBusBundle,
        );
        // ...
    }
    // ...
}

Usage

$container->get('innmind_event_bus')->dispatch(new MyEvent);

In order to dispatch your events you need to define the listeners as services with the tag innmind_event_bus.listener with the attribte listen_to that will contain the command FQCN., (*3)

The Versions