1
0
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:
Michael Dowling 2013-08-01 12:51:20 -07:00
parent ee0756ff06
commit 3f44bcba07
3 changed files with 3 additions and 28 deletions

View File

@ -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) {}
}

View File

@ -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;

View File

@ -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)
{