refactor: enhance plugin mechanism for better extensibility

This commit is contained in:
xboard
2025-01-26 02:31:57 +08:00
parent e858a7c6db
commit 0141c68167
6 changed files with 144 additions and 89 deletions
@@ -0,0 +1,22 @@
<?php
namespace App\Services\Plugin;
use Exception;
use Symfony\Component\HttpFoundation\Response;
class InterceptResponseException extends Exception
{
protected Response $response;
public function __construct(Response $response)
{
parent::__construct('Response intercepted');
$this->response = $response;
}
public function getResponse(): Response
{
return $this->response;
}
}