2017 © Pedro Peláez
 

library pimple-aware-event-dispatcher

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

image

davedevelopment/pimple-aware-event-dispatcher

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  • Friday, July 6, 2018
  • by davedevelopment
  • Repository
  • 2 Watchers
  • 12 Stars
  • 2,491 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Pimple Aware Event Dispatcher

Installation

composer.phar require "davedevelopment/pimple-aware-event-dispatcher:*@dev"

Usage

To use in a Silex application:, (*1)

``` php <?php, (*2)

use PimpleAwareEventDispatcher\PimpleAwareEventDispatcher; use Silex\Application; use Symfony\Component\EventDispatcher\EventDispatcher;, (*3)

$app = new Application;, (*4)

// define the dispatcher $app['event_dispatcher'] = function () use ($app) { $dispatcher = new EventDispatcher(); return new PimpleAwareEventDispatcher($dispatcher, $app); };, (*5)

// define our application services $app['some.service'] = function() use ($app) { // let's assume this takes a bit of doing and/or is dependant on several other // services sleep(1); return new SomeService; };, (*6)

// add a listener, that will lazily fetch the service when needed $app['event_dispatcher']->addListenerService( "some.event", array("some.service", "serviceMethod") ); ```, (*7)

The Versions

06/07 2018

dev-master

9999999-dev

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  Sources   Download

The Requires

 

The Development Requires

23/02 2018

3.0

3.0.0.0

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  Sources   Download

The Requires

 

The Development Requires

21/04 2013

v2.0.0

2.0.0.0

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  Sources   Download

The Requires

 

The Development Requires

12/04 2013

1.0.x-dev

1.0.9999999.9999999-dev

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  Sources   Download

The Requires

 

The Development Requires

05/03 2013

v1.0.0

1.0.0.0

A Symfony compatible event dispatcher that allows services to be lazy loaded from an instance of the Pimple DI container

  Sources   Download

The Requires

 

The Development Requires