mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +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,39 @@
|
|||
<?php
|
||||
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Adapter\TransactionInterface;
|
||||
|
||||
/**
|
||||
* Event object emitted after the response headers of a request have been
|
||||
* received.
|
||||
*
|
||||
* You may intercept the exception and inject a response into the event to
|
||||
* rescue the request.
|
||||
*/
|
||||
class HeadersEvent extends AbstractRequestEvent
|
||||
{
|
||||
/**
|
||||
* @param TransactionInterface $transaction Transaction that contains the
|
||||
* request and response.
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function __construct(TransactionInterface $transaction)
|
||||
{
|
||||
parent::__construct($transaction);
|
||||
if (!$transaction->getResponse()) {
|
||||
throw new \RuntimeException('A response must be present');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the response the was received
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->getTransaction()->getResponse();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue