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));
    }
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));
    }
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 ) ) ; }
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
Returns an extension by alias or namespace .