/**
  * RequestRateClient constructor.
  *
  * @param string $baseUri
  * @param string $userAgent
  * @param array $rates
  * @param float|int $fallbackValue
  */
 public function __construct($baseUri, $userAgent, array $rates, $fallbackValue = 0)
 {
     parent::__construct($baseUri, $userAgent);
     $this->rates = $rates;
     $this->fallbackValue = $fallbackValue;
 }
Example #2
0
 /**
  * DelayClient constructor.
  *
  * @param string $baseUri
  * @param string $userAgent
  * @param float|int $value
  * @param float|int $fallbackValue
  */
 public function __construct($baseUri, $userAgent, $value, $fallbackValue = 0)
 {
     parent::__construct($baseUri, $userAgent);
     $this->exportValue = $value;
     $this->value = $value > 0 ? $value : $fallbackValue;
 }