Init
This commit is contained in:
25
app/domain/Http/RequestLoggerSubscriber.php
Normal file
25
app/domain/Http/RequestLoggerSubscriber.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace App\Domain\Http;
|
||||
|
||||
use Contributte\Events\Extra\Event\Application\RequestEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Tracy\Debugger;
|
||||
|
||||
class RequestLoggerSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
*/
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [RequestEvent::class => 'onRequest'];
|
||||
}
|
||||
|
||||
public function onRequest(RequestEvent $event): void
|
||||
{
|
||||
Debugger::barDump($event->getRequest());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user