rfc6455/Guzzle/Http/Message/RequestFactory.php
Chris Boden 2ffcc6b0a7 [BCB] Namespace changes
Removed the `Component` namespace
Removed the `Resource` namespace
Renamed components:
`IOServerComponent` => `IoServer`
`WebSocketComponent` => `WsServer`
`SessionComponent` => `SessionProvider`
`WAMPServerComponent` => `WampServer`
`IpBlackListComponent` => `IpBlackList`
`FlashPolicyComponent` => `FlashPolicy`
2012-05-08 23:14:28 -04:00

19 lines
536 B
PHP

<?php
namespace Ratchet\WebSocket\Guzzle\Http\Message;
use Guzzle\Http\Message\RequestFactory as GuzzleRequestFactory;
use Guzzle\Http\EntityBody;
class RequestFactory extends GuzzleRequestFactory {
/**
* {@inheritdoc}
*/
public function create($method, $url, $headers = null, $body = null) {
$c = $this->entityEnclosingRequestClass;
$request = new $c($method, $url, $headers);
if ($body) {
$request->setBody(EntityBody::factory($body));
}
return $request;
}
}