From adc553360354a700c73de2729df18f3136933a48 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 20 Jul 2016 11:33:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=A7=84=E5=88=99=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0PATCH=E8=AF=B7=E6=B1=82=E7=B1=BB=E5=9E=8B=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/library/think/Route.php b/library/think/Route.php index 95c6229a..918f6c7a 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -26,6 +26,7 @@ class Route 'POST' => [], 'PUT' => [], 'DELETE' => [], + 'PATCH' => [], 'HEAD' => [], 'OPTIONS' => [], '*' => [], @@ -414,6 +415,20 @@ class Route self::rule($rule, $route, 'DELETE', $option, $pattern); } + /** + * 注册PATCH路由 + * @access public + * @param string $rule 路由规则 + * @param string $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return void + */ + public static function patch($rule, $route = '', $option = [], $pattern = []) + { + self::rule($rule, $route, 'PATCH', $option, $pattern); + } + /** * 注册资源路由 * @access public