2017 © Pedro Peláez
 

library php-ddd-bundle

Library to manage event

image

php-ddd/php-ddd-bundle

Library to manage event

  • Wednesday, December 31, 2014
  • by JulienDufresne
  • Repository
  • 3 Watchers
  • 5 Stars
  • 4,316 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PhpDDDBundle Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

PhpDDDBundle provides some tools to integrate php-ddd/domain-event and php-ddd/command inside your Symfony application., (*1)

Features

  • Services for SequentialCommandBus and CommandHandlerLocator
  • Services for EventBus and EventListenerLocator
  • A service tag to link Command with CommandHandler easily
  • A service tag to link Event with EventListener easily
  • A php-ddd:command-bus:debug Symfony command to list every Command/CommandHandler for a given CommandBus
  • A php-ddd:event-bus:debug Symfony command to list every Event/EventListener attached to a given EventBus

Usage

The easiest way to link a CommandHandler to a Command is by using service tag php_ddd.command_handler on the CommandHandler:, (*2)

# services.yml
services:
    my.command_handler.foo:
        class: My/CommandHandler/FooCommandHandler
        tags:
            - { name: php_ddd.command_handler, command: My/Command/Foo }

The CommandHandler will be automatically registered in the phpddd_command.handler_locator service which correspond to a CommandHandlerLocator. This CommandHandlerLocator is then passed to the phpddd_command.bus service which correspond to a SequentialCommandBus by default., (*3)

Add an EventListener listening to an Event using tags

It works the same way as for CommandHandler and Command:, (*4)

# services.yml
services:
    my.listener.bar:
        class: My/EventListener/BarEventListener
        tags:
            - { name: php_ddd.event_listener, event: Other/Event/Bar }

The EventListener will be automatically registered in the phpddd_event.listener_locator service which correspond to an EventListenerLocator. This EventListener is then passed to the phpddd_event.bus service which correspond to an EventBus by default., (*5)

The Versions

31/12 2014

dev-master

9999999-dev

Library to manage event

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julien Dufresne

31/12 2014

v1.0.0

1.0.0.0

Library to manage event

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julien Dufresne