src/OaiPmh/HarvesterFactory.php
protected function configureClient(Client $client, array $settings)
    {
        $configuredClient = $client ?: new Client();

        // Set authentication, if necessary:
        if (!empty($settings['httpUser']) && !empty($settings['httpPass'])) {
            $configuredClient->setAuth($settings['httpUser'], $settings['httpPass']);
        }

        // Set up assorted client options from $settings array:
        $configuredClient->setOptions($this->getClientOptions($settings));

        return $configuredClient;
    }
protected function configureClient(Client $client, array $settings)
    {
        $configuredClient = $client ?: new Client();

        // Set authentication, if necessary:
        if (!empty($settings['httpUser']) && !empty($settings['httpPass'])) {
            $configuredClient->setAuth($settings['httpUser'], $settings['httpPass']);
        }

        // Set up assorted client options from $settings array:
        $configuredClient->setOptions($this->getClientOptions($settings));

        return $configuredClient;
    }
protected function configureClient ( Client $ client , array $ settings ) { $ configuredClient = $ client ? : new Client ( ) ; // Set authentication, if necessary: if ( ! empty ( $ settings [ 'httpUser' ] ) && ! empty ( $ settings [ 'httpPass' ] ) ) { $ configuredClient -> setAuth ( $ settings [ 'httpUser' ] , $ settings [ 'httpPass' ] ) ; } // Set up assorted client options from $settings array: $ configuredClient -> setOptions ( $ this -> getClientOptions ( $ settings ) ) ; return $ configuredClient ; }
Configure the HTTP client

@param Client $client   HTTP client
@param array  $settings Settings

@return Client

@throws Exception
Configure the HTTP client