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
- 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 -
-
2,603 contributions in the last year
Activity overview
Contribution activity
May 2022
Created 50 commits in 4 repositories
Created a pull request in StenopePHP/Stenope that received 1 comment
[BC Break] Remove conflicting expression language custom functions
with new 6.1 operators: https://symfony.com/blog/new-in-symfony-6-1-improved-expressionlanguage-syntax
especially the contains
one which currently …
+2
−15
•
1
comment
Opened 7 other pull requests in 4 repositories
StenopePHP/Stenope
4
merged
rix-fr/rix
1
merged
Elao/elao_
1
merged
Elao/PhpEnums
1
merged
Reviewed 6 pull requests in 4 repositories
manala/manala-recipes
2 pull requests
symfony/symfony-docs
2 pull requests
rix-fr/rix
1 pull request
Elao/elao_
1 pull request
Opened 3 issues in 3 repositories
symfony/symfony
1
open
manala/manala-recipes
1
open
Elao/elao_
1
open
94
contributions
in private repositories
May 2 – May 20