public function setStore($s=null){
        if (file_exists($this->config)){
            include($this->config);
        } else {
            throw new Exception("Config file does not exist!");
        }
        
        if (empty($store) || !is_array($store)) {
            throw new Exception("No stores defined!");
        }
        
        if (!isset($s) && count($store)===1) {
            $s=key($store);
        }
        
        if(array_key_exists($s, $store)){
            $this->storeName = $s;
            if(array_key_exists('merchantId', $store[$s])){
                $this->options['SellerId'] = $store[$s]['merchantId'];
            } else {
                $this->log("Merchant ID is missing!",'Warning');
            }
            if(array_key_exists('keyId', $store[$s])){
                $this->options['AWSAccessKeyId'] = $store[$s]['keyId'];
            } else {
                $this->log("Access Key ID is missing!",'Warning');
            }
            if(!array_key_exists('secretKey', $store[$s])){
                $this->log("Secret Key is missing!",'Warning');
            }
            if (!empty($store[$s]['serviceUrl'])) {
                $this->urlbase = $store[$s]['serviceUrl'];
            }
            if (!empty($store[$s]['MWSAuthToken'])) {
                $this->options['MWSAuthToken'] = $store[$s]['MWSAuthToken'];
            }
            
        } else {
            $this->log("Store $s does not exist!",'Warning');
        }
    }
public function setStore($s=null){
        if (file_exists($this->config)){
            include($this->config);
        } else {
            throw new Exception("Config file does not exist!");
        }
        
        if (empty($store) || !is_array($store)) {
            throw new Exception("No stores defined!");
        }
        
        if (!isset($s) && count($store)===1) {
            $s=key($store);
        }
        
        if(array_key_exists($s, $store)){
            $this->storeName = $s;
            if(array_key_exists('merchantId', $store[$s])){
                $this->options['SellerId'] = $store[$s]['merchantId'];
            } else {
                $this->log("Merchant ID is missing!",'Warning');
            }
            if(array_key_exists('keyId', $store[$s])){
                $this->options['AWSAccessKeyId'] = $store[$s]['keyId'];
            } else {
                $this->log("Access Key ID is missing!",'Warning');
            }
            if(!array_key_exists('secretKey', $store[$s])){
                $this->log("Secret Key is missing!",'Warning');
            }
            if (!empty($store[$s]['serviceUrl'])) {
                $this->urlbase = $store[$s]['serviceUrl'];
            }
            if (!empty($store[$s]['MWSAuthToken'])) {
                $this->options['MWSAuthToken'] = $store[$s]['MWSAuthToken'];
            }
            
        } else {
            $this->log("Store $s does not exist!",'Warning');
        }
    }
public function setStore ( $ s = null ) { if ( file_exists ( $ this -> config ) ) { include ( $ this -> config ) ; } else { throw new Exception ( "Config file does not exist!" ) ; } if ( empty ( $ store ) || ! is_array ( $ store ) ) { throw new Exception ( "No stores defined!" ) ; } if ( ! isset ( $ s ) && count ( $ store ) === 1 ) { $ s = key ( $ store ) ; } if ( array_key_exists ( $ s , $ store ) ) { $ this -> storeName = $ s ; if ( array_key_exists ( 'merchantId' , $ store [ $ s ] ) ) { $ this -> options [ 'SellerId' ] = $ store [ $ s ] [ 'merchantId' ] ; } else { $ this -> log ( "Merchant ID is missing!" , 'Warning' ) ; } if ( array_key_exists ( 'keyId' , $ store [ $ s ] ) ) { $ this -> options [ 'AWSAccessKeyId' ] = $ store [ $ s ] [ 'keyId' ] ; } else { $ this -> log ( "Access Key ID is missing!" , 'Warning' ) ; } if ( ! array_key_exists ( 'secretKey' , $ store [ $ s ] ) ) { $ this -> log ( "Secret Key is missing!" , 'Warning' ) ; } if ( ! empty ( $ store [ $ s ] [ 'serviceUrl' ] ) ) { $ this -> urlbase = $ store [ $ s ] [ 'serviceUrl' ] ; } if ( ! empty ( $ store [ $ s ] [ 'MWSAuthToken' ] ) ) { $ this -> options [ 'MWSAuthToken' ] = $ store [ $ s ] [ 'MWSAuthToken' ] ; } } else { $ this -> log ( "Store $s does not exist!" , 'Warning' ) ; } }
Sets the store values.

This method sets a number of key values from the config file. These values
include your Merchant ID, Access Key ID, and Secret Key, and are critical
for making requests with Amazon. If the store cannot be found in the
config file, or if any of the key values are missing,
the incident will be logged.
@param string $s [optional] <p>The store name to look for.
This parameter is not required if there is only one store defined in the config file.</p>
@throws Exception If the file can't be found.
Sets the store values .