original_string: public function getContainerExtension()
      {
          if (null === $this->extension) {
              $extension = $this->createContainerExtension();
  
              if (null !== $extension) {
                  if (!$extension instanceof ExtensionInterface) {
                      throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension)));
                  }
  
                  // check naming convention
                  $basename = preg_replace('/Bundle$/', '', $this->getName());
                  $expectedAlias = Container::underscore($basename);
  
                  if ($expectedAlias != $extension->getAlias()) {
                      throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
                  }
  
                  $this->extension = $extension;
              } else {
                  $this->extension = false;
              }
          }
  
          if ($this->extension) {
              return $this->extension;
          }
      }
code: public function getContainerExtension()
      {
          if (null === $this->extension) {
              $extension = $this->createContainerExtension();
  
              if (null !== $extension) {
                  if (!$extension instanceof ExtensionInterface) {
                      throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension)));
                  }
  
                  // check naming convention
                  $basename = preg_replace('/Bundle$/', '', $this->getName());
                  $expectedAlias = Container::underscore($basename);
  
                  if ($expectedAlias != $extension->getAlias()) {
                      throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.', $expectedAlias, $extension->getAlias()));
                  }
  
                  $this->extension = $extension;
              } else {
                  $this->extension = false;
              }
          }
  
          if ($this->extension) {
              return $this->extension;
          }
      }
code_tokens: public function getContainerExtension ( ) { if ( null === $ this -> extension ) { $ extension = $ this -> createContainerExtension ( ) ; if ( null !== $ extension ) { if ( ! $ extension instanceof ExtensionInterface ) { throw new \ LogicException ( sprintf ( 'Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.' , \ get_class ( $ extension ) ) ) ; } // check naming convention $ basename = preg_replace ( '/Bundle$/' , '' , $ this -> getName ( ) ) ; $ expectedAlias = Container :: underscore ( $ basename ) ; if ( $ expectedAlias != $ extension -> getAlias ( ) ) { throw new \ LogicException ( sprintf ( 'Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.' , $ expectedAlias , $ extension -> getAlias ( ) ) ) ; } $ this -> extension = $ extension ; } else { $ this -> extension = false ; } } if ( $ this -> extension ) { return $ this -> extension ; } }
docstring: Returns the bundle's container extension.
  
  @return ExtensionInterface|null The container extension
  
  @throws \LogicException
docstring_tokens: Returns the bundle s container extension .