mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Migrate RainLoop Webmail to use Facebook Graph API instead of FQL
This commit is contained in:
parent
9fcaf00875
commit
d0dbb26548
120 changed files with 18817 additions and 1746 deletions
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace GuzzleHttp\Adapter;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
||||
/**
|
||||
* Decorates a regular AdapterInterface object and creates a
|
||||
* ParallelAdapterInterface object that sends multiple HTTP requests serially.
|
||||
*/
|
||||
class FakeParallelAdapter implements ParallelAdapterInterface
|
||||
{
|
||||
/** @var AdapterInterface */
|
||||
private $adapter;
|
||||
|
||||
/**
|
||||
* @param AdapterInterface $adapter Adapter used to send requests
|
||||
*/
|
||||
public function __construct(AdapterInterface $adapter)
|
||||
{
|
||||
$this->adapter = $adapter;
|
||||
}
|
||||
|
||||
public function sendAll(\Iterator $transactions, $parallel)
|
||||
{
|
||||
foreach ($transactions as $transaction) {
|
||||
try {
|
||||
$this->adapter->send($transaction);
|
||||
} catch (RequestException $e) {
|
||||
// no op for batch transaction
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue