namespace think\exception;
use think\Response;
class HttpResponseException extends \RuntimeException
{
/**
* @var Response
*/
protected $response;
public function __construct(Response $response)
{
//位置1
$this->response = $response;
}
public function getResponse()
{
//位置2
return $this->response;
}
}
我在__construct函数中是有数据的,但在getResponse函数中 $this->response数据就没有了
这个是什么原因