From 08935cfe5b6fa5d3c7ff8e4f353c6a2519b87bc5 Mon Sep 17 00:00:00 2001 From: Yurun Date: Tue, 21 Dec 2021 13:21:12 +0800 Subject: [PATCH] Optimize --- framework/base/router.class.php | 33 +++++++++++++- .../exception/EndResponseException.class.php | 45 ------------------- 2 files changed, 32 insertions(+), 46 deletions(-) delete mode 100644 framework/exception/EndResponseException.class.php diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 2ab8a7fe24..570e004f23 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -12,7 +12,6 @@ * May you find forgiveness for yourself and forgive others. * May you share freely, never taking more than you give. */ -include dirname(__DIR__) . '/exception/EndResponseException.class.php'; class baseRouter { /** @@ -2781,3 +2780,35 @@ class super if($this->scope == 'global') a($GLOBALS); } } + +class EndResponseException extends \Exception +{ + /** + * 响应内容 + * + * @var string + */ + private $content; + + /** + * @param string $content + * + * @return sellf + */ + public static function create($content = '') + { + $exception = new self; + $exception->content = $content; + return $exception; + } + + /** + * Get 响应内容 + * + * @return string + */ + public function getContent() + { + return $this->content; + } +} diff --git a/framework/exception/EndResponseException.class.php b/framework/exception/EndResponseException.class.php deleted file mode 100644 index 6380f5519f..0000000000 --- a/framework/exception/EndResponseException.class.php +++ /dev/null @@ -1,45 +0,0 @@ -content = $content; - return $exception; - } - - /** - * Get 响应内容 - * - * @return string - */ - public function getContent() - { - return $this->content; - } -}