vendor/boshurik/telegram-bot-bundle/src/BoShurikTelegramBotBundle.php line 20

  1. <?php
  2. /*
  3.  * This file is part of the BoShurikTelegramBotBundle.
  4.  *
  5.  * (c) Alexander Borisov <boshurik@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace BoShurik\TelegramBotBundle;
  11. use BoShurik\TelegramBotBundle\DependencyInjection\BoShurikTelegramBotExtension;
  12. use BoShurik\TelegramBotBundle\DependencyInjection\Compiler\CommandCompilerPass;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  15. use Symfony\Component\HttpKernel\Bundle\Bundle;
  16. class BoShurikTelegramBotBundle extends Bundle
  17. {
  18.     public function build(ContainerBuilder $container)
  19.     {
  20.         parent::build($container);
  21.         $container->addCompilerPass(new CommandCompilerPass());
  22.     }
  23.     public function getContainerExtension(): ?ExtensionInterface
  24.     {
  25.         if (null === $this->extension) {
  26.             $this->extension = new BoShurikTelegramBotExtension();
  27.         }
  28.         return $this->extension;
  29.     }
  30. }