protected function databaseConfigToBackup(array $db)
    {
        $connection = $this->getDatabaseConnectionConfig($db['source']['connection']);

        // translate laravel settings to source options
        $options = [
            'host'      => $connection['host'],
            'user'      => $connection['username'],
            'password'  => $connection['password'],
            'databases' => $connection['database'],
        ];

        // check for configuration options
        if (isset($db['source']['options'])) {
            $options = array_merge($options, $db['source']['options']);
        }

        $backup = new Configuration\Backup('db-' . $db['source']['connection'], false);
        $type   = $this->getDatabaseSourceType($connection['driver']);
        $backup->setSource(new Configuration\Backup\Source($type, $options));

        return $backup;
    }
protected function databaseConfigToBackup(array $db)
    {
        $connection = $this->getDatabaseConnectionConfig($db['source']['connection']);

        // translate laravel settings to source options
        $options = [
            'host'      => $connection['host'],
            'user'      => $connection['username'],
            'password'  => $connection['password'],
            'databases' => $connection['database'],
        ];

        // check for configuration options
        if (isset($db['source']['options'])) {
            $options = array_merge($options, $db['source']['options']);
        }

        $backup = new Configuration\Backup('db-' . $db['source']['connection'], false);
        $type   = $this->getDatabaseSourceType($connection['driver']);
        $backup->setSource(new Configuration\Backup\Source($type, $options));

        return $backup;
    }
protected function databaseConfigToBackup ( array $ db ) { $ connection = $ this -> getDatabaseConnectionConfig ( $ db [ 'source' ] [ 'connection' ] ) ; // translate laravel settings to source options $ options = [ 'host' => $ connection [ 'host' ] , 'user' => $ connection [ 'username' ] , 'password' => $ connection [ 'password' ] , 'databases' => $ connection [ 'database' ] , ] ; // check for configuration options if ( isset ( $ db [ 'source' ] [ 'options' ] ) ) { $ options = array_merge ( $ options , $ db [ 'source' ] [ 'options' ] ) ; } $ backup = new Configuration \ Backup ( 'db-' . $ db [ 'source' ] [ 'connection' ] , false ) ; $ type = $ this -> getDatabaseSourceType ( $ connection [ 'driver' ] ) ; $ backup -> setSource ( new Configuration \ Backup \ Source ( $ type , $ options ) ) ; return $ backup ; }
Translate a laravel db config to phpbu backup configuration.

@param  array $db
@throws \phpbu\Laravel\Configuration\Exception
@return \phpbu\App\Configuration\Backup
Translate a laravel db config to phpbu backup configuration .