2017 © Pedro Peláez
 

library pxb-zend-events

Zend Event Manager module for ddimitrov/pxb

image

ddimitrov/pxb-zend-events

Zend Event Manager module for ddimitrov/pxb

  • Tuesday, January 26, 2016
  • by DaGhostman
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

pxb-zend-events


Bootstraps the SharedEventManager from ZF2 with events, based on those available in the configuration files of other modules., (*1)

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

return [ 'events' => [ 'event.name' => [ [ 'identifiers' => 'handler_identifier', 'callback' => 'MyAwesomeEventHandler', 'priority' => 100 // This is optional, if not present defaults to 1 ], [ 'identifiers' => ['id1', 'id2'], 'callback' => 'MyOtherAwesomeHandler' ], ], 'another.event => [ /* more event definitions */ ] // .... ] ]; ``` This helps to pre-populate the event object with a set of events during runtime, allowing early calls to them from the application, instead of having to wait for and object to be instantiated and then defining them, which will happen in most cases around the time of dispatch., (*3)

This is useful in cases such as logging errors (the app may crash before the logger event is defined) if the app crashes too early., (*4)

The Versions

26/01 2016

dev-master

9999999-dev

Zend Event Manager module for ddimitrov/pxb

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dimitar Dimitrov