初始化
This commit is contained in:
44
addons/webman/exception/HttpResponseException.php
Normal file
44
addons/webman/exception/HttpResponseException.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace addons\webman\exception;
|
||||
|
||||
|
||||
use support\exception\BusinessException;
|
||||
use Webman\Http\Request;
|
||||
use Webman\Http\Response;
|
||||
|
||||
class HttpResponseException extends BusinessException
|
||||
{
|
||||
/**
|
||||
* The underlying response instance.
|
||||
*
|
||||
* @var Response
|
||||
*/
|
||||
protected $response;
|
||||
|
||||
/**
|
||||
* Create a new HTTP response exception instance.
|
||||
*
|
||||
* @param Response $response
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Response $response)
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the underlying response instance.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
public function render(Request $request): ?Response
|
||||
{
|
||||
return $this->getResponse(); // TODO: Change the autogenerated stub
|
||||
}
|
||||
}
|
||||
10
addons/webman/exception/PermissionException.php
Normal file
10
addons/webman/exception/PermissionException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace addons\webman\exception;
|
||||
|
||||
use Exception;
|
||||
|
||||
class PermissionException extends Exception
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user