protected function parseConnectionsFromOptions(OptionsBag $options)
    {
        if ($options->has('connections')) {
            $connections = $options->get('connections');
        } elseif ($options->has('connection')) {
            $connections = [$options->get('connection')];
        } elseif ($options->has('host') || $options->has('port')) {
            Deprecated::warn('Specifying "host" and other options directly in session config', 1.0, 'Move them under the "connection" key.');

            $connections = [$options->all()];
        } else {
            $connections = [[]];
        }

        return array_map([$this, 'parseConnectionItemFromOptions'], $connections);
    }
protected function parseConnectionsFromOptions(OptionsBag $options)
    {
        if ($options->has('connections')) {
            $connections = $options->get('connections');
        } elseif ($options->has('connection')) {
            $connections = [$options->get('connection')];
        } elseif ($options->has('host') || $options->has('port')) {
            Deprecated::warn('Specifying "host" and other options directly in session config', 1.0, 'Move them under the "connection" key.');

            $connections = [$options->all()];
        } else {
            $connections = [[]];
        }

        return array_map([$this, 'parseConnectionItemFromOptions'], $connections);
    }
protected function parseConnectionsFromOptions ( OptionsBag $ options ) { if ( $ options -> has ( 'connections' ) ) { $ connections = $ options -> get ( 'connections' ) ; } elseif ( $ options -> has ( 'connection' ) ) { $ connections = [ $ options -> get ( 'connection' ) ] ; } elseif ( $ options -> has ( 'host' ) || $ options -> has ( 'port' ) ) { Deprecated :: warn ( 'Specifying "host" and other options directly in session config' , 1.0 , 'Move them under the "connection" key.' ) ; $ connections = [ $ options -> all ( ) ] ; } else { $ connections = [ [ ] ] ; } return array_map ( [ $ this , 'parseConnectionItemFromOptions' ] , $ connections ) ; }
Parses session options with array configuration into a list of connection parameters.

@param OptionsBag $options

@return OptionsBag[]
Parses session options with array configuration into a list of connection parameters .