You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
459 B
PHP
22 lines
459 B
PHP
<?php
|
|
namespace pdt256\Shipping\RateRequest;
|
|
|
|
class StubFedex extends Adapter
|
|
{
|
|
private $artificialDelay = 0;
|
|
|
|
public function __construct($artificial_delay = 0)
|
|
{
|
|
$this->artificialDelay = $artificial_delay;
|
|
}
|
|
|
|
public function execute($url, $data = null)
|
|
{
|
|
if ($this->artificialDelay > 0) {
|
|
sleep($this->artificialDelay);
|
|
}
|
|
|
|
return file_get_contents(__DIR__ . '/FedexResponse.xml');
|
|
}
|
|
}
|