This modification gives Ratchet its own RequestFactory instance.
This way you can use guzzle as REST Client.
This commit is contained in:
parent
2206a9fc83
commit
1370cb6109
@ -4,6 +4,23 @@ use Guzzle\Http\Message\RequestFactory as GuzzleRequestFactory;
|
||||
use Guzzle\Http\EntityBody;
|
||||
|
||||
class RequestFactory extends GuzzleRequestFactory {
|
||||
|
||||
protected static $ratchetInstance;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
// @codeCoverageIgnoreStart
|
||||
if (!static::$ratchetInstance) {
|
||||
static::$ratchetInstance = new static();
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return static::$ratchetInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user