23 lines
408 B
PHP
23 lines
408 B
PHP
<?php
|
|
namespace app\exception;
|
|
|
|
use RuntimeException;
|
|
use support\Response;
|
|
|
|
class HttpResponseException extends RuntimeException
|
|
{
|
|
protected $response;
|
|
|
|
// 接收 Response 实例作为参数
|
|
public function __construct(Response $response)
|
|
{
|
|
$this->response = $response;
|
|
}
|
|
|
|
// 获取响应对象
|
|
public function getResponse()
|
|
{
|
|
return $this->response;
|
|
}
|
|
}
|