public function connect(array $config)
    {
        $connection = $this->createConnection($config);

        $this->validateCredentials($config);

        // For basic authentication we need an Authorization
        // header to be set. We add it to the request here.
        $this->addHeader(
            'Authorization',
            'Basic ' . base64_encode(
                array_get($config, 'identifier') . ':' . array_get($config, 'secret')
            )
        );

        return $connection;
    }
public function connect(array $config)
    {
        $connection = $this->createConnection($config);

        $this->validateCredentials($config);

        // For basic authentication we need an Authorization
        // header to be set. We add it to the request here.
        $this->addHeader(
            'Authorization',
            'Basic ' . base64_encode(
                array_get($config, 'identifier') . ':' . array_get($config, 'secret')
            )
        );

        return $connection;
    }
public function connect ( array $ config ) { $ connection = $ this -> createConnection ( $ config ) ; $ this -> validateCredentials ( $ config ) ; // For basic authentication we need an Authorization // header to be set. We add it to the request here. $ this -> addHeader ( 'Authorization' , 'Basic ' . base64_encode ( array_get ( $ config , 'identifier' ) . ':' . array_get ( $ config , 'secret' ) ) ) ; return $ connection ; }
Establish an API connection.

@param  array  $config
@return self
Establish an API connection .