Developed with love by KnpLabs Hire us for your project!
26

AsyncDispatcherBundle

by BranchBit

Providing an async event dispatcher in symfony projects

AsyncDispatcherBundle

SensioLabsInsight
knpbundles.com

Build Status
Coverage Status

Latest Stable Version
Total Downloads

AsyncDispatcherBundle is a simple bundle which provides you with an async event dispatcher, which will store events untill kernel.terminate, and then fire them using the regular event dispatcher.

Step 1: Download BBITAsyncDispatcherBundle using composer

Add BBITAsyncDispatcherBundle in your composer.json: (use the latest stable, NOT dev-master)

{
    "require": {
        "bbit/async-dispatcher-bundle": "2.1.0",
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update bbit/async-dispatcher-bundle

Composer will install the bundle to your project's vendor/BBIT directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new BBIT\AsyncDispatcherBundle\BBITAsyncDispatcherBundle(),
    );
}

Usage:

$dispatcher = $this->container->get('bbit_async_dispatcher.dispatcher'); // get dispatcher service
$dispatcher->addAsyncEvent('name_of_the.event', new CustomEvent($entity));
The MIT License (MIT)

Copyright (c) 2014 BranchBit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
bbit_async_dispatcher:
dispatcher_class: BBIT\AsyncDispatcherBundle\Component\EventDispatcher\AsynchronousEventDispatcher
terminate_class: BBIT\AsyncDispatcherBundle\Component\EventDispatcher\AsynchronousEventListener
  • Merge pull request #8 from mayeco/patch-3
    By whitewhidow, 2 years ago
  • Merge pull request #7 from mayeco/patch-2
    By whitewhidow, 2 years ago
  • add space, psr-2
    By mayeco, 2 years ago
  • Add LICENSE
    By mayeco, 2 years ago
  • Merge pull request #5 from mayeco/patch-1
    By whitewhidow, 2 years ago
  • Merge pull request #4 from mayeco/configs
    By whitewhidow, 2 years ago
  • remove ~ file
    By mayeco, 2 years ago
  • get the config values
    By mayeco, 2 years ago
  • Update Configuration.php
    By mayeco, 2 years ago
  • add parameters to container
    By mayeco, 2 years ago
  • add class in configuration
    By mayeco, 2 years ago
  • remove class from services.yml
    By mayeco, 2 years ago
  • Merge pull request #3 from mayeco/tabs_s
    By whitewhidow, 2 years ago
  • remove space
    By mayeco, 2 years ago
  • tabs to spaces
    By mayeco, 2 years ago
  • tabs to spaces
    By mayeco, 2 years ago
  • Merge pull request #2 from mayeco/multiples_fix
    By whitewhidow, 2 years ago
  • revert to public, is event
    By mayeco, 2 years ago
  • hide the terminate listener in the container
    By mayeco, 2 years ago
  • not needed comment
    By mayeco, 2 years ago
  • fix class parameter position
    By mayeco, 2 years ago
  • fix service.yml file
    By mayeco, 2 years ago
  • delete template
    By mayeco, 2 years ago
  • delete ~ file
    By mayeco, 2 years ago
  • delete ~ file
    By mayeco, 2 years ago
  • delete ~ file
    By mayeco, 2 years ago
  • remove routing
    By mayeco, 2 years ago
  • typos
    By whitewhidow, 2 years ago
  • Update phpunit.xml
    By whitewhidow, 3 years ago
  • Update phpunit.xml
    By whitewhidow, 3 years ago