1: <?php
2:
3: namespace Guzzle\Http\Exception;
4:
5: use Guzzle\Common\Exception\RuntimeException;
6: use Guzzle\Http\Message\RequestInterface;
7:
8: /**
9: * Http request exception
10: */
11: class RequestException extends RuntimeException implements HttpException
12: {
13: /**
14: * @var RequestInterface
15: */
16: protected $request;
17:
18: /**
19: * Set the request that caused the exception
20: *
21: * @param RequestInterface $request Request to set
22: *
23: * @return RequestException
24: */
25: public function setRequest(RequestInterface $request)
26: {
27: $this->request = $request;
28:
29: return $this;
30: }
31:
32: /**
33: * Get the request that caused the exception
34: *
35: * @return RequestInterface
36: */
37: public function getRequest()
38: {
39: return $this->request;
40: }
41: }
42: