2
namespace GuzzleHttp\Adapter;
4
use GuzzleHttp\Exception\RequestException;
7
* Decorates a regular AdapterInterface object and creates a
8
* ParallelAdapterInterface object that sends multiple HTTP requests serially.
10
class FakeParallelAdapter implements ParallelAdapterInterface
12
/** @var AdapterInterface */
16
* @param AdapterInterface $adapter Adapter used to send requests
18
public function __construct(AdapterInterface $adapter)
20
$this->adapter = $adapter;
23
public function sendAll(\Iterator $transactions, $parallel)
25
foreach ($transactions as $transaction) {
27
$this->adapter->send($transaction);
28
} catch (RequestException $e) {
29
if ($e->getThrowImmediately()) {