Exemple #1
0
 /**
  * AmazonProduct acts as a container for various results from other classes.
  *
  * The parameters are passed to the parent constructor, which are
  * in turn passed to the AmazonCore constructor. See it for more information
  * on these parameters and common methods.
  * Please note that an extra parameter comes before the usual Mock Mode parameters,
  * so be careful when setting up the object.
  * @param string $s <p>Name for the store you want to use.</p>
  * @param SimpleXMLElement $data [optional] <p>XML data from Amazon to be parsed.</p>
  * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
  * This defaults to <b>FALSE</b>.</p>
  * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
  * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
  */
 public function __construct($s, $data = null, $mock = false, $m = null, $config = null)
 {
     parent::__construct($s, $mock, $m, $config);
     if ($data) {
         $this->loadXML($data);
     }
     unset($this->productList);
 }
 /**
  * AmazonProductList fetches a list of products from Amazon.
  *
  * The parameters are passed to the parent constructor, which are
  * in turn passed to the AmazonCore constructor. See it for more information
  * on these parameters and common methods.
  * @param string $s <p>Name for the store you want to use.</p>
  * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
  * This defaults to <b>FALSE</b>.</p>
  * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
  * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
  */
 public function __construct($s, $mock = false, $m = null, $config = null)
 {
     parent::__construct($s, $mock, $m, $config);
     include $this->env;
     $this->options['Action'] = 'GetMatchingProductForId';
     if (isset($THROTTLE_TIME_PRODUCTLIST)) {
         $this->throttleTime = $THROTTLE_TIME_PRODUCTLIST;
     }
     $this->throttleGroup = 'GetMatchingProductForId';
 }
 /**
  * AmazonProductList fetches a list of products from Amazon that match a search query.
  *
  * The parameters are passed to the parent constructor, which are
  * in turn passed to the AmazonCore constructor. See it for more information
  * on these parameters and common methods.
  * Please note that an extra parameter comes before the usual Mock Mode parameters,
  * so be careful when setting up the object.
  * @param string $s <p>Name for the store you want to use.</p>
  * @param string $q [optional] <p>The query string to set for the object.</p>
  * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
  * This defaults to <b>FALSE</b>.</p>
  * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
  * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
  */
 public function __construct($s, $q = null, $mock = false, $m = null, $config = null)
 {
     parent::__construct($s, $mock, $m, $config);
     include $this->env;
     if ($q) {
         $this->setQuery($q);
     }
     $this->options['Action'] = 'ListMatchingProducts';
     if (isset($THROTTLE_TIME_PRODUCTMATCH)) {
         $this->throttleTime = $THROTTLE_TIME_PRODUCTMATCH;
     }
     $this->throttleGroup = 'ListMatchingProducts';
 }
 /**
  * AmazonProductInfo fetches a list of info from Amazon.
  *
  * The parameters are passed to the parent constructor, which are
  * in turn passed to the AmazonCore constructor. See it for more information
  * on these parameters and common methods.
  * @param string $s <p>Name for the store you want to use.</p>
  * @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
  * This defaults to <b>FALSE</b>.</p>
  * @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
  * @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
  */
 public function __construct($s, $mock = false, $m = null, $config = null)
 {
     parent::__construct($s, $mock, $m, $config);
 }