26 lines
520 B
PHP
Executable File
26 lines
520 B
PHP
Executable File
<?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());
|
|
}
|
|
|
|
}
|