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);
    }