1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace ICanBoogie\HTTP;
13
14 use ICanBoogie\Accessor\AccessorTrait;
15
16 17 18 19 20
21 class MethodNotSupported extends \Exception implements Exception
22 {
23 use AccessorTrait;
24
25 private $method;
26
27 protected function get_method()
28 {
29 return $this->method;
30 }
31
32 33 34 35 36
37 public function __construct($method, $code = 500, \Exception $previous = null)
38 {
39 $this->method = $method;
40
41 parent::__construct(\ICanboogie\format('Method not supported: %method', [ 'method' => $method ]), $code, $previous);
42 }
43 }
44