public function setGeneralApiCallParameters(array $apiCallParameters)
    {
        if (!isset($apiCallParameters['host'])) {
            throw new BadApiConfigurationException(sprintf(
                '[%s] Missing parameter for GENERAL API configuration: host.', $this->getApiName())
            );
        }

        // Setting api call parameters
        $this->host = $apiCallParameters['host'];

        // Setting port
        if (isset($apiCallParameters['port'])) {
            $this->port = $apiCallParameters['port'];
        }

        // Setting user
        if (isset($apiCallParameters['user'])) {
            $this->user = $apiCallParameters['user'];
        }

        // Setting password
        if (isset($apiCallParameters['password'])) {
            $this->password = $apiCallParameters['password'];
        }

        // If defined, we set user and password parameters for authentication purposes
        if ($this->user && $this->password) {
            $this->client->setAuth($this->user, $this->password);
        }
    }
public function setGeneralApiCallParameters(array $apiCallParameters)
    {
        if (!isset($apiCallParameters['host'])) {
            throw new BadApiConfigurationException(sprintf(
                '[%s] Missing parameter for GENERAL API configuration: host.', $this->getApiName())
            );
        }

        // Setting api call parameters
        $this->host = $apiCallParameters['host'];

        // Setting port
        if (isset($apiCallParameters['port'])) {
            $this->port = $apiCallParameters['port'];
        }

        // Setting user
        if (isset($apiCallParameters['user'])) {
            $this->user = $apiCallParameters['user'];
        }

        // Setting password
        if (isset($apiCallParameters['password'])) {
            $this->password = $apiCallParameters['password'];
        }

        // If defined, we set user and password parameters for authentication purposes
        if ($this->user && $this->password) {
            $this->client->setAuth($this->user, $this->password);
        }
    }
public function setGeneralApiCallParameters ( array $ apiCallParameters ) { if ( ! isset ( $ apiCallParameters [ 'host' ] ) ) { throw new BadApiConfigurationException ( sprintf ( '[%s] Missing parameter for GENERAL API configuration: host.' , $ this -> getApiName ( ) ) ) ; } // Setting api call parameters $ this -> host = $ apiCallParameters [ 'host' ] ; // Setting port if ( isset ( $ apiCallParameters [ 'port' ] ) ) { $ this -> port = $ apiCallParameters [ 'port' ] ; } // Setting user if ( isset ( $ apiCallParameters [ 'user' ] ) ) { $ this -> user = $ apiCallParameters [ 'user' ] ; } // Setting password if ( isset ( $ apiCallParameters [ 'password' ] ) ) { $ this -> password = $ apiCallParameters [ 'password' ] ; } // If defined, we set user and password parameters for authentication purposes if ( $ this -> user && $ this -> password ) { $ this -> client -> setAuth ( $ this -> user , $ this -> password ) ; } }
Sets all general parameters for all api calls

@param array $apiCallParameters the api call parameters array

@return void

@throws \Msl\RemoteHost\Exception\BadApiConfigurationException
Sets all general parameters for all api calls