vendor/sylius/sylius/src/Sylius/Bundle/OrderBundle/SyliusOrderBundle.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c) Paweł Jędrzejewski
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\OrderBundle;
  12. use Sylius\Bundle\OrderBundle\DependencyInjection\Compiler\RegisterCartContextsPass;
  13. use Sylius\Bundle\OrderBundle\DependencyInjection\Compiler\RegisterProcessorsPass;
  14. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  15. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. final class SyliusOrderBundle extends AbstractResourceBundle
  18. {
  19. public function getSupportedDrivers(): array
  20. {
  21. return [
  22. SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  23. ];
  24. }
  25. public function build(ContainerBuilder $container): void
  26. {
  27. parent::build($container);
  28. $container->addCompilerPass(new RegisterProcessorsPass());
  29. $container->addCompilerPass(new RegisterCartContextsPass());
  30. }
  31. /**
  32. * @psalm-suppress MismatchingDocblockReturnType https://github.com/vimeo/psalm/issues/2345
  33. */
  34. protected function getModelNamespace(): string
  35. {
  36. return 'Sylius\Component\Order\Model';
  37. }
  38. }