mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-25 02:22:57 +01:00
Getting rid of AbstractAdapter
This commit is contained in:
parent
ee0756ff06
commit
3f44bcba07
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Guzzle\Http\Adapter;
|
||||
|
||||
use Guzzle\Http\Message\MessageFactoryInterface;
|
||||
|
||||
abstract class AbstractAdapter implements AdapterInterface
|
||||
{
|
||||
protected $messageFactory;
|
||||
|
||||
/**
|
||||
* @param MessageFactoryInterface $messageFactory Factory used to create responses
|
||||
* @param array $options Adapter options
|
||||
*/
|
||||
public function __construct(MessageFactoryInterface $messageFactory, array $options = [])
|
||||
{
|
||||
$this->messageFactory = $messageFactory;
|
||||
$this->init($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization hook
|
||||
*/
|
||||
protected function init(array $options) {}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Guzzle\Http\Adapter\Curl;
|
||||
|
||||
use Guzzle\Http\Adapter\AbstractAdapter;
|
||||
use Guzzle\Http\Adapter\AdapterInterface;
|
||||
use Guzzle\Http\Adapter\Transaction;
|
||||
use Guzzle\Http\Exception\AdapterException;
|
||||
use Guzzle\Http\Exception\RequestException;
|
||||
@ -12,7 +12,7 @@ use Guzzle\Stream\Stream;
|
||||
/**
|
||||
* HTTP adapter that uses cURL as a transport layer
|
||||
*/
|
||||
class CurlAdapter extends AbstractAdapter
|
||||
class CurlAdapter implements AdapterInterface
|
||||
{
|
||||
/** @var CurlFactory */
|
||||
private $factory;
|
||||
|
@ -10,7 +10,7 @@ use Guzzle\Stream\Stream;
|
||||
/**
|
||||
* HTTP adapter that uses PHP's HTTP stream wrapper
|
||||
*/
|
||||
class StreamAdapter extends AbstractAdapter
|
||||
class StreamAdapter implements AdapterInterface
|
||||
{
|
||||
public function send(Transaction $transaction)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user