2017 © Pedro Peláez
 

library eventure

Auryn based event dispatching

image

vlakarados/eventure

Auryn based event dispatching

  • Tuesday, June 7, 2016
  • by vlakarados
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

eventure

Auryn event dispatching, (*1)

What

A very small library to work with simple events., (*2)

The whole point of this library is to allow Auryn to inject dependencies straight to your event methods., (*3)

Install

composer require vlakarados/eventure

How

  • Create a class and extend \Eventure\Dispatcher

Any public method in this class will be a registered event for the corresponding dispatcher., (*4)

Two functions are used by the parent dispatcher class that may not be overriden (restricted event names): dispatch(), hasEvent()., (*5)

  • Inject the class instance in any other object across your project and use the dispatch($eventName) method to send the event.

Example

Examples are in the example/ directory, the ExampleDispatcher and the test bootstrap file., (*6)

TODO

  • Callback dispatchers
  • Remove method restriction
  • Better README.md
  • Better documentation
  • Any documentation, actually
  • Dispatcher class factory (?)
  • Static event calls like \App\Dispatchers\User::dispatch('logIn', array('userId' => 12345)) or \App\Dispatchers\User::logIn(array('userId' => 12345)) (?)

The Versions

07/06 2016

dev-master

9999999-dev

Auryn based event dispatching

  Sources   Download

The Requires

 

by Sergey Telshevsky