Skip to content
View ogizanagi's full-sized avatar

Organizations

@Elao @manala @rix-fr @StenopePHP

Block or report ogizanagi

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
ogizanagi/README.md
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'];
    }
}

Pinned Loading

  1. symfony/symfony symfony/symfony Public

    The Symfony PHP framework

    PHP 29.8k 9.5k

  2. Elao/PhpEnums Elao/PhpEnums Public

    🔩 Extended PHP 8.1+ enums features & specific integrations with frameworks and libraries

    PHP 326 27

  3. StenopePHP/Stenope StenopePHP/Stenope Public

    The static website generator for Symfony developers

    PHP 119 9

  4. StenopePHP/skeleton StenopePHP/skeleton Public

    Starter kit for content-based static site using Stenope

    PHP 2 2

  5. shiningame shiningame Public

    Shiny little extracts from enjoyable games ✨ 🎮 🌅

    PHP 5