src/ConnectionManager.php
public function connect(array $config, string $name = 'main'): Connection
    {
        if (isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [$name] is already configured.");
        }

        $this->connections[$name] = new Connection($config);

        return $this->connections[$name];
    }
public function connect(array $config, string $name = 'main'): Connection
    {
        if (isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [$name] is already configured.");
        }

        $this->connections[$name] = new Connection($config);

        return $this->connections[$name];
    }
public function connect ( array $ config , string $ name = 'main' ) : Connection { if ( isset ( $ this -> connections [ $ name ] ) ) { throw new InvalidArgumentException ( "Connection [$name] is already configured." ) ; } $ this -> connections [ $ name ] = new Connection ( $ config ) ; return $ this -> connections [ $ name ] ; }
Connect to the given connection.

@param array  $config
@param string $name

@return \ArkEcosystem\Client\Connection
Connect to the given connection .