public function openConnection()
    {
        if (null == $this->httpClient) {
            return false;
        }

        $configuration = array_merge(array(
            'authUrl' => '',
            'password' => '',
            'queryUrl' => '',
            'username' => ''
        ), $this->configuration);

        // authenticate only if an authUrl was given.
        if ($this->RdfHelpers->simpleCheckURI($configuration['authUrl'])) {
            $this->authenticateOnServer(
                $configuration['authUrl'],
                $configuration['username'],
                $configuration['password']
            );
        }

        // check query URL
        if (false === $this->RdfHelpers->simpleCheckURI($configuration['queryUrl'])) {
            throw new \Exception('Parameter queryUrl is not an URI or empty: '. $configuration['queryUrl']);
        }
    }
public function openConnection()
    {
        if (null == $this->httpClient) {
            return false;
        }

        $configuration = array_merge(array(
            'authUrl' => '',
            'password' => '',
            'queryUrl' => '',
            'username' => ''
        ), $this->configuration);

        // authenticate only if an authUrl was given.
        if ($this->RdfHelpers->simpleCheckURI($configuration['authUrl'])) {
            $this->authenticateOnServer(
                $configuration['authUrl'],
                $configuration['username'],
                $configuration['password']
            );
        }

        // check query URL
        if (false === $this->RdfHelpers->simpleCheckURI($configuration['queryUrl'])) {
            throw new \Exception('Parameter queryUrl is not an URI or empty: '. $configuration['queryUrl']);
        }
    }
public function openConnection ( ) { if ( null == $ this -> httpClient ) { return false ; } $ configuration = array_merge ( array ( 'authUrl' => '' , 'password' => '' , 'queryUrl' => '' , 'username' => '' ) , $ this -> configuration ) ; // authenticate only if an authUrl was given. if ( $ this -> RdfHelpers -> simpleCheckURI ( $ configuration [ 'authUrl' ] ) ) { $ this -> authenticateOnServer ( $ configuration [ 'authUrl' ] , $ configuration [ 'username' ] , $ configuration [ 'password' ] ) ; } // check query URL if ( false === $ this -> RdfHelpers -> simpleCheckURI ( $ configuration [ 'queryUrl' ] ) ) { throw new \ Exception ( 'Parameter queryUrl is not an URI or empty: ' . $ configuration [ 'queryUrl' ] ) ; } }
Establish a connection to the endpoint and authenticate.

@return Client Setup HTTP client.
Establish a connection to the endpoint and authenticate .