Status502
云策文档标注
概述
本文档定义了 WordPress 中用于处理 502 Bad Gateway HTTP 响应的异常类 Status502。该类继承自 Http 类,并指定了状态码和原因短语。
关键要点
- Status502 是一个 final 类,继承自 Http 类,用于表示 502 Bad Gateway 错误。
- 该类设置了 protected 属性 $code 为 502 和 $reason 为 'Bad Gateway',以定义 HTTP 状态码和原因短语。
原文内容
Exception for 502 Bad Gateway responses
Source
final class Status502 extends Http {
/**
* HTTP status code
*
* @var integer
*/
protected $code = 502;
/**
* Reason phrase
*
* @var string
*/
protected $reason = 'Bad Gateway';
}