| 1 | <?php |
||
| 13 | class MethodNotAllowedException extends ClientException { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Initialize the {@link MethodNotAllowedException}. |
||
| 17 | * |
||
| 18 | * @param string $method The http method that's not allowed. |
||
| 19 | * @param array|string $allow An array http methods that are allowed. |
||
| 20 | */ |
||
| 21 | 7 | public function __construct($method, $allow = []) { |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Get the allowed http methods. |
||
| 29 | * |
||
| 30 | * @return array Returns an array of allowed methods. |
||
| 31 | */ |
||
| 32 | 7 | public function getAllow() { |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Specify data which should be serialized to JSON. |
||
| 38 | * |
||
| 39 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
| 40 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
| 41 | * which is a value of any type other than a resource. |
||
| 42 | */ |
||
| 43 | 7 | public function jsonSerialize() { |
|
| 49 | } |
||
| 50 |