class Kernel extends SymfonyKernel implements EventSubscriberInterface
{
use MicroKernelTrait;
public function bowtiesAction(): Response
{
return new RedirectResponse('I wear a fez now. Fezzes are cool!');
}
public function dangerousAction(): Response
{
throw new Danger('🔥🔥 😈🐷 🔱🔺 🔥🔥');
}
public function onKernelException(ExceptionEvent $event): void
{
if ($event->getThrowable() instanceof Danger) {
$event->setResponse(new Response("👴🏻: It's dangerous to go alone. Take this: 🗡️"));
}
}
protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->add('bowties', '/bowties')->controller('kernel::bowtiesAction');
$routes->add('danger', '/danger')->controller('kernel::dangerousAction');
}
public static function getSubscribedEvents(): array
{
return [KernelEvents::EXCEPTION => 'onKernelException'];
}
}
- Lyon | France
-
21:20
(UTC +01:00) - http://shiningame.ogizanagi.fr
- @ogizanagi
Block or Report
Block or report ogizanagi
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
-
Elao/PhpEnums Public
🔩 Extended PHP 8.1+ enums features & specific integrations with frameworks and libraries -
-
-
3,709 contributions in the last year
Less
More
Activity overview
Contribution activity
March 2023
Created 17 commits in 3 repositories
Opened 2 pull requests in 2 repositories
Elao/PhpEnums
1
merged
StenopePHP/Stenope
1
merged
Reviewed 3 pull requests in 3 repositories
Elao/PhpEnums
1 pull request
manala/manala
1 pull request
Elao/elao_
1 pull request
175
contributions
in private repositories
Mar 1 – Mar 23