mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-13 03:45:22 +01:00
[Http] Abstracting protocolVersion. Not forcing CurlFactory to be a singleton, but the singleton instance is available for performance.
This commit is contained in:
parent
930494c795
commit
52ded354a1
@ -60,22 +60,6 @@ class CurlFactory implements CurlFactoryInterface
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton constructor
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton clone
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
private function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of connections per host
|
||||
*
|
||||
|
@ -31,6 +31,11 @@ abstract class AbstractMessage implements MessageInterface
|
||||
*/
|
||||
protected $cacheControl = null;
|
||||
|
||||
/*
|
||||
* @var string HTTP protocol version of the message
|
||||
*/
|
||||
protected $protocolVersion = '1.1';
|
||||
|
||||
/**
|
||||
* Get application and plugin specific parameters set on the message. The
|
||||
* return object is a reference to the internal object.
|
||||
|
@ -44,11 +44,6 @@ use Guzzle\Http\Url;
|
||||
*/
|
||||
class Request extends AbstractMessage implements RequestInterface
|
||||
{
|
||||
/**
|
||||
* @var string Protocol version of the request (1.0, 1.1, etc)
|
||||
*/
|
||||
protected $protocolVersion = '1.1';
|
||||
|
||||
/**
|
||||
* @var Url HTTP Url
|
||||
*/
|
||||
|
@ -84,21 +84,13 @@ class Response extends AbstractMessage
|
||||
*/
|
||||
protected $protocol = 'HTTP';
|
||||
|
||||
/*
|
||||
* @var string HTTP protocol version
|
||||
*/
|
||||
protected $protocolVersion = '1.1';
|
||||
|
||||
/**
|
||||
* @var array Information about the request
|
||||
*/
|
||||
protected $info = array();
|
||||
|
||||
/**
|
||||
* The request object associated with the response. This value may or
|
||||
* may not be set
|
||||
*
|
||||
* @var RequestInterface
|
||||
* @var RequestInterface Request object that may or may not be set
|
||||
*/
|
||||
protected $request = null;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user