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

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the BoShurikTelegramBotBundle.
  4.  *
  5.  * (c) Alexander Borisov <[email protected]>
  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\HttpKernel\Bundle\Bundle;
  15. class BoShurikTelegramBotBundle extends Bundle
  16. {
  17.     /**
  18.      * {@inheritDoc}
  19.      */
  20.     public function build(ContainerBuilder $container)
  21.     {
  22.         parent::build($container);
  23.         $container->addCompilerPass(new CommandCompilerPass());
  24.     }
  25.     /**
  26.      * {@inheritDoc}
  27.      */
  28.     public function getContainerExtension()
  29.     {
  30.         if (null === $this->extension) {
  31.             $this->extension = new BoShurikTelegramBotExtension();
  32.         }
  33.         return $this->extension;
  34.     }
  35. }