MethodNotAllowedException
继承于 RuntimeException定义不允许方法错误的异常。
| 自 |
2.0.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
__construct
构造函数。
__construct(mixed||string|int allowedMethods, message = null, code = 405, \Exception previous = null) :
参数
- allowedMethods
array<string|int, mixed>路由允许的方法。- message
null要抛出的异常消息。- code
int异常代码。- previous
Exception|null用于异常链的先前可抛出对象。
响应
混合
getAllowedMethods
获取允许的 HTTP 方法。
getAllowedMethods() : mixed||string|int
| 自 |
2.0.0 |
|---|
响应
array<string|int, mixed>
属性
allowedMethods
给定路由的允许方法
| 自 |
2.0.0 |
|---|
类型
array<string|int, string>