original_string: public function getExtension($name)
      {
          if (isset($this->extensions[$name])) {
              return $this->extensions[$name];
          }
  
          if (isset($this->extensionsByNs[$name])) {
              return $this->extensionsByNs[$name];
          }
  
          throw new LogicException(sprintf('Container extension "%s" is not registered', $name));
      }
code: public function getExtension($name)
      {
          if (isset($this->extensions[$name])) {
              return $this->extensions[$name];
          }
  
          if (isset($this->extensionsByNs[$name])) {
              return $this->extensionsByNs[$name];
          }
  
          throw new LogicException(sprintf('Container extension "%s" is not registered', $name));
      }
code_tokens: public function getExtension ( $ name ) { if ( isset ( $ this -> extensions [ $ name ] ) ) { return $ this -> extensions [ $ name ] ; } if ( isset ( $ this -> extensionsByNs [ $ name ] ) ) { return $ this -> extensionsByNs [ $ name ] ; } throw new LogicException ( sprintf ( 'Container extension "%s" is not registered' , $ name ) ) ; }
docstring: Returns an extension by alias or namespace.
  
  @param string $name An alias or a namespace
  
  @return ExtensionInterface An extension instance
  
  @throws LogicException if the extension is not registered
docstring_tokens: Returns an extension by alias or namespace .