public function addExtension(ExtensionInterface $extension): App
    {
        try {
            if (!$extension->isInitialized()) {
                $extension->init($this);
            }
        } catch (\Exception $e) {
            throw new RuntimeException(sprintf('Unable to load extension "%s"', get_class($extension)));
        }

        return $this;
    }
public function addExtension(ExtensionInterface $extension): App
    {
        try {
            if (!$extension->isInitialized()) {
                $extension->init($this);
            }
        } catch (\Exception $e) {
            throw new RuntimeException(sprintf('Unable to load extension "%s"', get_class($extension)));
        }

        return $this;
    }
public function addExtension ( ExtensionInterface $ extension ) : App { try { if ( ! $ extension -> isInitialized ( ) ) { $ extension -> init ( $ this ) ; } } catch ( \ Exception $ e ) { throw new RuntimeException ( sprintf ( 'Unable to load extension "%s"' , get_class ( $ extension ) ) ) ; } return $ this ; }
Add extension.

@param \Berlioz\Core\ExtensionInterface $extension

@return \Berlioz\Core\App
@throws \Berlioz\Core\Exception\RuntimeException If unable to load extension
Add extension .