1
0
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:
Michael Dowling 2011-03-28 22:24:18 -05:00
parent 930494c795
commit 52ded354a1
4 changed files with 6 additions and 30 deletions

View File

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

View File

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

View File

@ -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
*/

View File

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