Skip to content
View ogizanagi's full-sized avatar

Sponsors

@pyrech

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.7k 9.4k

  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 118 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