attribute-spass/src/Handler/Lol.php
lubiana 8b353ec62a
apply php styler
Signed-off-by: lubiana <lubiana123@gmail.com>
2023-09-26 18:24:12 +02:00

24 lines
622 B
PHP

<?php declare(strict_types=1);
namespace Lubian\AttributeMagic\Handler;
use Lubian\AttributeMagic\Infrastructure\Event\Dispatcher;
use Lubian\AttributeMagic\Infrastructure\Route\AsHandler;
use Lubian\AttributeMagic\Infrastructure\Route\HttpMethod;
use Lubian\AttributeMagic\Listener\LauschEvent;
final readonly class Lol
{
public function __construct(
private Dispatcher $dispatcher
) {
}
#[AsHandler(HttpMethod::GET, '/')]
public function lol(): void
{
$event = new LauschEvent('aaaaaaaalso');
$this->dispatcher->dispatch($event);
echo $event->message;
}
}