vendor/zenstruck/foundry/src/ZenstruckFoundryBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace Zenstruck\Foundry;
  3. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  4. use Symfony\Component\HttpKernel\Bundle\Bundle;
  5. use Zenstruck\Foundry\Bundle\DependencyInjection\ZenstruckFoundryExtension;
  6. /**
  7.  * Must be at src root to be auto-configured by Symfony Flex.
  8.  *
  9.  * @author Kevin Bond <kevinbond@gmail.com>
  10.  */
  11. final class ZenstruckFoundryBundle extends Bundle
  12. {
  13.     public function boot(): void
  14.     {
  15.         if (!Factory::isBooted()) {
  16.             Factory::boot($this->container->get(Configuration::class));
  17.         }
  18.     }
  19.     protected function createContainerExtension(): ?ExtensionInterface
  20.     {
  21.         return new ZenstruckFoundryExtension();
  22.     }
  23. }