Skip to content
Avatar

Highlights

  • Arctic Code Vault Contributor

Organizations

@symfony @Elao @manala @StenopePHP

Sponsors

@pyrech
ogizanagi/README.md
class Kernel extends SymfonyKernel implements EventSubscriberInterface
{
    use MicroKernelTrait;

    public function bowtiesAction(): Response
    {
        return new Response('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'];
    }
}

Pinned

  1. The Symfony PHP framework

    PHP 24.8k 8.1k

  2. 🔩 Provides enumerations for PHP & frameworks integrations

    PHP 195 11

2,876 contributions in the last year

Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Mon Wed Fri

Contribution activity

March 2021

Opened 2 pull requests in 1 repository

Created an issue in kanga333/variable-mapper that received 1 comment

"Error: Failed to get key index" when the regex contains an escaping backslash

In case of such an expression: "^staging(-[\\w/-]*)?$": { ... } We get: Error: Failed to get key index of ^staging(-[\w/-]*)?$ Which I guess is rel…

1 comment
Opened 1 other issue in 1 repository
StenopePHP/Stenope
1 open
416 contributions in private repositories Mar 1 – Mar 25

Seeing something unexpected? Take a look at the GitHub profile guide.