contributte/event-application-bridge
Bridge between event dispatcher and nette application
Maintainers
Package info
github.com/contributte/event-application-bridge
pkg:composer/contributte/event-application-bridge
Requires
- php: >= 5.6
- nette/application: ^2.4.6.
- nette/di: ^2.4.8
Requires (Dev)
- contributte/event-dispatcher: ^0.3.0
- ninjify/nunjuck: ^0.1.4
- ninjify/qa: ^0.3.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2022-02-01 13:07:21 UTC
README
👁 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e
👁 68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77
👁 68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
| ⚠️ | This project is no longer being maintained. Please use contributte/event-dispatcher-extra. |
|---|
| Composer | contributte/event-application-bridge |
|---|---|
| Version | 👁 Image |
| PHP | 👁 Image |
| License | 👁 Image |
Versions
| State | Version | Branch | PHP |
|---|---|---|---|
| stable | ^0.1 |
master |
>= 5.6 |
Documentation
Usage 🎉
extensions: events: Contributte\EventDispatcher\DI\EventDispatcherExtension events2application: Contributte\Events\Bridges\Application\DI\EventApplicationBridgeExtension
Bridge 🔧
There are several Nette Application events on which you can listen to.
use Contributte\Events\Bridges\Application\Event\ApplicationEvents; use Contributte\Events\Bridges\Application\Event\ErrorEvent; use Contributte\Events\Bridges\Application\Event\PresenterEvent; use Contributte\Events\Bridges\Application\Event\RequestEvent; use Contributte\Events\Bridges\Application\Event\ResponseEvent; use Contributte\Events\Bridges\Application\Event\ShutdownEvent; use Contributte\Events\Bridges\Application\Event\StartupEvent;
StartupEvent::NAME&&ApplicationEvents::ON_STARTUPShutdownEvent::NAME&&ApplicationEvents::ON_SHUTDOWNRequestEvent::NAME&&ApplicationEvents::ON_REQUESTPresenterEvent::NAME&&ApplicationEvents::ON_PRESENTERResponseEvent::NAME&&ApplicationEvents::ON_RESPONSEErrorEvent::NAME&&ApplicationEvents::ON_ERROR
Subscriber 💡
use Contributte\EventDispatcher\EventSubscriber; use Contributte\Events\Bridges\Application\Event\RequestEvent; final class LogRequestSubscriber implements EventSubscriber { /** * @return array */ public static function getSubscribedEvents() { return [RequestEvent::NAME => 'onLog']; } /** * @param RequestEvent $event * @return void */ public function onLog(RequestEvent $event) { // Do magic.. } }
Development
This package was maintain by these authors.
👁 538058?v=3&s=80Consider to support contributte development team. Also thank you for being used this package.
