ferror/eventbus-bundle

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master 2019-07-15 19:32 UTC

README

Build Status License MIT License MIT

event-bus

Simple events tracking package

Installation

composer require ferror/eventbus-bundle

Configuration:

services.yaml
services:
    Ferror\Bundle\EventBus\EventBusClient\JsonEventBusClient: ~
    Ferror\Bundle\EventBus\EventBus:
        class: 'Ferror\Bundle\EventBus\EventBus'
        arguments: ['@Ferror\Bundle\EventBus\EventBusClient\JsonEventBusClient']
DefaultController.php
public $eventBus;

public function __construct(Ferror\EventBus\EventBus $eventBus)
{
    $this->eventBus = $eventBus;
}

public function track(Event $event) : void
{
    $this->eventBus->track($event);
}