Register the database source class.

@return void
960460
protected function registerMysqlDumpSource()
    {
        $this->app->bind(MysqlDumpSource::class, function (Container $app) {
            $config = $app['config'];

            return new MysqlDumpSource($config);
        });
    }
632184
public function register() {
		if ($this->app->runningInConsole()) {
			$this->registerConsoleCommands();
			$this->app->singleton(DatabaseMigrationCommand::class, function ($app) {
				return new DatabaseMigrationCommand($app->make('migrator'), $app->make(DatabaseManager::class));
			});
			$this->app->singleton(DatabaseRollbackCommand::class, function ($app) {
				return new DatabaseRollbackCommand($app->make('migrator'), $app->make(DatabaseManager::class));
			});
			$this->app->singleton(DatabaseResetCommand::class, function ($app) {
				return new DatabaseResetCommand($app->make('migrator'), $app->make(DatabaseManager::class));
			});
			$this->app->singleton(DatabaseRefreshCommand::class, function ($app) {
				return new DatabaseRefreshCommand($app->make('migrator'), $app->make(DatabaseManager::class));
			});
			$this->app->singleton(DatabaseFreshCommand::class, function ($app) {
				return new DatabaseFreshCommand($app->make(DatabaseManager::class));
			});
			$this->app->singleton(DatabaseSeedCommand::class, function ($app) {
				return new DatabaseSeedCommand($app->make('db'), $app->make(DatabaseManager::class));
			});

		}
		$this->registerPublishables();
		$this->registerHelpers();
	}
1240905
private function registerConnections()
    {
        $this->app->bind('db.connection.mysql', function ($app, $parameters) {
            list($connection, $database, $prefix, $config) = $parameters;
            return new MysqlConnection($connection, $database, $prefix, $config);
        });

        $this->app->bind('db.connection.postgres', function ($app, $parameters) {
            list($connection, $database, $prefix, $config) = $parameters;
            return new PostgresConnection($connection, $database, $prefix, $config);
        });

        $this->app->bind('db.connection.sqllite', function ($app, $parameters) {
            list($connection, $database, $prefix, $config) = $parameters;
            return new SqlLiteConnection($connection, $database, $prefix, $config);
        });

        $this->app->bind('db.connection.sqlserver', function ($app, $parameters) {
            list($connection, $database, $prefix, $config) = $parameters;
            return new SqlServerConnection($connection, $database, $prefix, $config);
        });
    }
1220100
protected function registerDatabaseCommand()
    {
        $app = $this->app;

        $app['command.queue.database'] = $app->share(function ($app) {
                return new DatabaseCommand();
            });

        $this->commands('command.queue.database');
    }
117508
public function register()
    {
        $this->app->resolving('db', function ($db) {
            $db->extend('rethinkdb', function ($config) {
                return new Connection($config);
            });
        });

        $this->app->singleton('command.rethink-migrate.make', function ($app) {

            $creator = new MigrationCreator($app['files']);
            $composer = $app['composer'];

            return new MigrateMakeCommand($creator, $composer);
        });

        $this->commands('command.rethink-migrate.make');

        $this->app->singleton('command.rethink-model.make', function ($app) {
            return new ModelMakeCommand($app['files']);
        });

        $this->commands('command.rethink-model.make');
    }
371200
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../../config/transactional-events.php',
            'transactional-events'
        );

        if (! $this->app['config']->get('transactional-events.enable')) {
            return;
        }

        $this->app->afterResolving('db', function ($connectionResolver) {
            $eventDispatcher = $this->app->make(EventDispatcher::class);
            $this->app->extend('events', function () use ($connectionResolver, $eventDispatcher) {
                $dispatcher = new TransactionalDispatcher($connectionResolver, $eventDispatcher);
                $dispatcher->setTransactionalEvents($this->app['config']->get('transactional-events.transactional'));
                $dispatcher->setExcludedEvents($this->app['config']->get('transactional-events.excluded'));

                return $dispatcher;
            });
        });
    }
145158
public function register()
	{
        $this->app->singleton('basement', function()
        {
            // retrieve settings from app/config/database.php
            extract(Config::get('database.couchbase'));

            $defaults = array(
                'name' => 'default',
                'host' => isset($host) ? $host : '127.0.0.1',
                'bucket' => isset($bucket) ? $bucket : 'default',
                'password' => isset($password) ? $password : null,
                'user' => null,
                'persist' => isset($persist_conn) ? $persist_conn : false,
                'connect' => true,
                'transcoder' => 'json',
				'environment' => preg_match('/dev|local/i', App::environment()) ? 'development' : App::environment()
            );

            return new Client($defaults);
        });

        // Shortcut so developers don't need to add an Alias in app/config/app.php
        $this->app->booting(function()
        {
            $loader = AliasLoader::getInstance();
            $loader->alias('Cb', 'Shift31\LaravelBasement\Facades\Cb');
        });
	}
705399
public function register()
    {
        $app = $this->app;

        // register spec path for app
        $app['path.specs'] = $app->basePath().'/resources/specs';

        // register spec repository
        $app->singleton('specs', function ($app) {
            $loader = new Repository\FileLoader($app['files'], $app['path.specs']);

            return new Repository\NamespacedRepository($loader);
        });

        // register addon environment
        $app->instance('addon', $this->addonEnvironment = new AddonEnvironment($app));
        $app->alias('addon', AddonEnvironment::class);

        // register addon generator
        $app->singleton('addon.generator', function ($app) {
            return new AddonGenerator();
        });
        $app->alias('addon.generator', AddonGenerator::class);

        // register database migrator
        $app->singleton('database.migrator', function ($app) {
            return new Migrator($app['db'], $app['config']);
        });
        $app->alias('database.migrator', Migrator::class);

        $app['events']->fire(new AddonWorldCreated($this->addonEnvironment));

        $this->registerClassResolvers();

        (new AddonRegistrar)->register($app, $this->addonEnvironment->addons());

        $app['events']->fire(new AddonRegistered($this->addonEnvironment));
    }
214788
private function registerDatabaseConfig()
    {
        $this->app->bindShared('config/database', function ($app) {
            $loader = $app->make('Concrete\Core\Config\DatabaseLoader');
            $saver = $app->make('Concrete\Core\Config\DatabaseSaver');

            return $app->build('Concrete\Core\Config\Repository\Repository', array($loader, $saver, $app->environment()));
        });
    }
573408
public function register() {

        $this->app->register('Sgpatil\Orientdb\MigrationServiceProvider');

        $this->app['db']->extend('orientdb', function($config) {
            return new Connection($config);
        });

        $this->app->booting(function() {
            $loader = \Illuminate\Foundation\AliasLoader::getInstance();
            $loader->alias('Orientdb', 'Sgpatil\Orientdb\Eloquent\Model');
        });

        $this->app->bind('ConnectionResolverInterface', function($app) {
            $databases = $app['config']['database.connections'];
            $defaultConnection = $app['config']['database.default'];
            if($databases[$defaultConnection]['driver']!='orientdb') {
                $defaultConnection = $app['config']['database.default_nosql'];
            }
            $conn = new Connection($databases[$defaultConnection]);
            return new DatabaseManager($app, $conn);
        });

        $this->app->bind('MigrationRepositoryInterface', function($app) {
            $resolver = $this->app->make('ConnectionResolverInterface');
            $table = $app['config']['database.migrations'];
            return new DatabaseMigrationRepository($resolver, $table);
        });

        $this->app->bind('orientdb.database', function($app) {
            $databases = $app['config']['database.connections'];
            $defaultConnection = $app['config']['database.default'];
            if($databases[$defaultConnection]['driver']!='orientdb') {
                $defaultConnection = $app['config']['database.default_nosql'];
            }

            if(empty($defaultConnection)){
                throw new \Exception('Invalid database connection type. Please check DB_CONNECTION in database configuration file or in .env file.');
            }
            return new Connection($databases[$defaultConnection]);
        });

        $this->app->bind('CreateOrientdbMigration', function($app) {
            $database = $this->app->make('orientdb.database');
            return new CreateOrientdbMigration($database);
        });


        $CreateOrientdbMigration = $this->app->make('CreateOrientdbMigration');

        $this->commands('CreateOrientdbMigration');
    }
1305441
private function registerDatabaseProvider() {
        $this->app->bind(\BackupManager\Databases\DatabaseProvider::class, function ($app) {
            $provider = new Databases\DatabaseProvider($this->getDatabaseConfig($app['config']['database.connections']));
            $provider->add(new Databases\MysqlDatabase);
            $provider->add(new Databases\PostgresqlDatabase);
            return $provider;
        });
    }
1017504
public function register()
    {
        $this->app->singleton(BaseRepository::class, function () {
            return new BaseRepository;
        });

        $this->app->alias(BaseRepository::class, 'baserepository');
    }
119895
public function register()
    {
        // The connection factory is used to create the actual connection instances on
        // the database. We will inject the factory into the manager so that it may
        // make the connections while they are actually needed and not of before.
        $this->app->singleton('db.factory', function ($app) {
            return new ConnectionFactory($app);
        });

        // The database manager is used to resolve various connections, since multiple
        // connections might be managed. It also implements the connection resolver
        // interface which may be used by other components requiring connections.
        $this->app->singleton('db', function ($app) {
            return new DatabaseManager($app, $app['db.factory']);
        });
    }
1097104
public function register()
	{
		$this->app->singleton('qqwry', function ($app) {
			$file = realpath(__DIR__ . '/../../../database/qqwry.dat');
			return new QQWry($file);
		});
	}
1056604
protected function addgroup_database(){
		$this->registerGroup(BLang::_('ADMIN_CONFIG_GENERAL_MYSQL'),'database',array(
			new BConfigFieldString(
				'MYSQL_DB_HOST',
				BLang::_('ADMIN_CONFIG_GENERAL_MYSQL_DBHOST'),
				'127.0.0.1'),
			new BConfigFieldString(
				'MYSQL_DB_USERNAME',
				BLang::_('ADMIN_CONFIG_GENERAL_MYSQL_DBUSERNAME'),
				'root'),
			new BConfigFieldPassword(
				'MYSQL_DB_PASSWORD',
				BLang::_('ADMIN_CONFIG_GENERAL_MYSQL_DBPASSWORD'),
				''),
			new BConfigFieldString(
				'MYSQL_DB_NAME',
				BLang::_('ADMIN_CONFIG_GENERAL_MYSQL_DBNAME'),
				'vidido')
			));
		}
189745
protected function registerRepository()
    {
        $this->app->singleton('neoeloquent.migration.repository', function($app)
        {
            $model = new MigrationModel;

            $label = $app['config']['database.migrations_node'];

            if (isset($label)) {
                $model->setLabel($label);
            }

            return new DatabaseMigrationRepository(
                $app['db'],
                $app['db']->connection('neo4j')->getSchemaBuilder(),
                $model
            );
        });
    }
370159
public function register()
    {
        $this->commands(MigrateCommand::class);
        $this->commands(ModelsCommand::class);
        $this->commands(SeedCommand::class);

        $this->mergeConfigFrom(__DIR__ . '/../../config/config.php', 'db-exporter');
    }