src/Console/Command.php
public function addExtension(AbstractExtension $extension)
    {
        if (!$extension->isAvailable()) {
            throw new ExtensionException('Extension ' . get_class($extension) . ' is not available', $extension);
        }

        $this->extensions[] = $extension->bind($this);
    }
public function addExtension(AbstractExtension $extension)
    {
        if (!$extension->isAvailable()) {
            throw new ExtensionException('Extension ' . get_class($extension) . ' is not available', $extension);
        }

        $this->extensions[] = $extension->bind($this);
    }
public function addExtension ( AbstractExtension $ extension ) { if ( ! $ extension -> isAvailable ( ) ) { throw new ExtensionException ( 'Extension ' . get_class ( $ extension ) . ' is not available' , $ extension ) ; } $ this -> extensions [ ] = $ extension -> bind ( $ this ) ; }
Register and bind the extension

@param AbstractExtension $extension

@throws ExtensionException
Register and bind the extension