Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | final class RequestNotFoundException extends RuntimeException |
||
22 | { |
||
23 | const MSG = 'A Request object for a request to %s could not be found'; |
||
24 | const CODE = 16; |
||
25 | |||
26 | /** |
||
27 | * @var RequestInterface |
||
28 | */ |
||
29 | private $request; |
||
30 | |||
31 | /** |
||
32 | * RequestNotFoundException constructor. |
||
33 | * |
||
34 | * @param RequestInterface $request The Request we can't find a timer for |
||
35 | * @param \Exception $e A previous exception, if any |
||
36 | */ |
||
37 | public function __construct( |
||
38 | RequestInterface $request, |
||
39 | Exception $e = null |
||
40 | ) { |
||
41 | $this->request = $request; |
||
42 | |||
43 | parent::__construct( |
||
44 | sprintf(self::MSG, $request->getUri()), |
||
45 | self::CODE, |
||
46 | $e |
||
47 | ); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return \Psr\Http\Message\RequestInterface |
||
52 | */ |
||
53 | public function getRequest() |
||
56 | } |
||
57 | } |
||
58 |