src/Sylius/Bundle/PaymentBundle/SyliusPaymentBundle.php line 24

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\PaymentBundle;
  12. use Sylius\Bundle\PaymentBundle\DependencyInjection\Compiler\RegisterPaymentMethodsResolversPass;
  13. use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
  14. use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. /**
  17.  * Payments component for Symfony2 applications.
  18.  */
  19. final class SyliusPaymentBundle extends AbstractResourceBundle
  20. {
  21.     /**
  22.      * {@inheritdoc}
  23.      */
  24.     public function getSupportedDrivers(): array
  25.     {
  26.         return [
  27.             SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
  28.         ];
  29.     }
  30.     /**
  31.      * {@inheritdoc}
  32.      */
  33.     public function build(ContainerBuilder $container): void
  34.     {
  35.         parent::build($container);
  36.         $container->addCompilerPass(new RegisterPaymentMethodsResolversPass());
  37.     }
  38.     /**
  39.      * {@inheritdoc}
  40.      */
  41.     protected function getModelNamespace(): string
  42.     {
  43.         return 'Sylius\Component\Payment\Model';
  44.     }
  45. }