src/MediableServiceProvider.php
public function registerSourceAdapterFactory()
    {
        $this->app->singleton('mediable.source.factory', function (Container $app) {
            $factory = new SourceAdapterFactory;
            $adapters = $app['config']->get('mediable.source_adapters');

            foreach ($adapters['class'] as $source => $adapter) {
                $factory->setAdapterForClass($adapter, $source);
            }

            foreach ($adapters['pattern'] as $source => $adapter) {
                $factory->setAdapterForPattern($adapter, $source);
            }

            return $factory;
        });
        $this->app->alias('mediable.source.factory', SourceAdapterFactory::class);
    }
public function registerSourceAdapterFactory()
    {
        $this->app->singleton('mediable.source.factory', function (Container $app) {
            $factory = new SourceAdapterFactory;
            $adapters = $app['config']->get('mediable.source_adapters');

            foreach ($adapters['class'] as $source => $adapter) {
                $factory->setAdapterForClass($adapter, $source);
            }

            foreach ($adapters['pattern'] as $source => $adapter) {
                $factory->setAdapterForPattern($adapter, $source);
            }

            return $factory;
        });
        $this->app->alias('mediable.source.factory', SourceAdapterFactory::class);
    }
public function registerSourceAdapterFactory ( ) { $ this -> app -> singleton ( 'mediable.source.factory' , function ( Container $ app ) { $ factory = new SourceAdapterFactory ; $ adapters = $ app [ 'config' ] -> get ( 'mediable.source_adapters' ) ; foreach ( $ adapters [ 'class' ] as $ source => $ adapter ) { $ factory -> setAdapterForClass ( $ adapter , $ source ) ; } foreach ( $ adapters [ 'pattern' ] as $ source => $ adapter ) { $ factory -> setAdapterForPattern ( $ adapter , $ source ) ; } return $ factory ; } ) ; $ this -> app -> alias ( 'mediable.source.factory' , SourceAdapterFactory :: class ) ; }
Bind an instance of the Source Adapter Factory to the container.

Attaches the default adapter types
@return void
Bind an instance of the Source Adapter Factory to the container .