Website ๐ contributte.org | Contact ๐จ๐ปโ๐ป f3l1x.io | Twitter ๐ฆ @contributte
| This project is no longer being maintained. Please use contributte/event-dispatcher-extra. |
|---|
| Composer | contributte/event-application-bridge |
|---|---|
| Version | |
| PHP | |
| License |
| State | Version | Branch | PHP |
|---|---|---|---|
| stable | ^0.1 |
master |
>= 5.6 |
extensions:
events: Contributte\EventDispatcher\DI\EventDispatcherExtension
events2application: Contributte\Events\Bridges\Application\DI\EventApplicationBridgeExtensionThere 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
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..
}
}This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.