move code to repository root

This commit is contained in:
lubiana 2023-01-25 22:09:06 +01:00
parent 47e227257c
commit 9ce2c0ae4c
No known key found for this signature in database
35 changed files with 2025 additions and 0 deletions

15
src/Handler/Auchnoch.php Normal file
View file

@ -0,0 +1,15 @@
<?php declare(strict_types=1);
namespace Lubian\AttributeMagic\Handler;
use Lubian\AttributeMagic\Infrastructure\Route\AsHandler;
use Lubian\AttributeMagic\Infrastructure\Route\HttpMethod;
final class Auchnoch
{
#[AsHandler(HttpMethod::GET, '/auchnoch')]
public function undso(): void
{
echo 'AUCHNOCH';
}
}

17
src/Handler/HalloDimi.php Normal file
View file

@ -0,0 +1,17 @@
<?php declare(strict_types=1);
namespace Lubian\AttributeMagic\Handler;
use Lubian\AttributeMagic\Infrastructure\Route\AsHandler;
use Lubian\AttributeMagic\Infrastructure\Route\HttpMethod;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
final class HalloDimi
{
#[AsHandler(HttpMethod::GET, '/dimi')]
public function hallo(): Response
{
return new JsonResponse(['Hallo Dimi']);
}
}

24
src/Handler/Lol.php Normal file
View file

@ -0,0 +1,24 @@
<?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 class Lol
{
public function __construct(
private readonly Dispatcher $dispatcher,
) {
}
#[AsHandler(HttpMethod::GET, '/')]
public function lol(): void
{
$event = new LauschEvent('aaaaaaaalso');
$this->dispatcher->dispatch($event);
echo $event->message;
}
}

View file