From b446e86a02b2e3df0a60f660250b8d3d145dfb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 20 Oct 2020 15:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Node.php | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 6e37ce54..095cb331 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -29,7 +29,6 @@ class Node extends Application public $childes = []; public $group = []; - public $options = null; private $_error = ''; @@ -67,7 +66,7 @@ class Node extends Application } else { $this->handler = $handler; } -// return $this->restructure(); + return $this; } @@ -225,7 +224,7 @@ class Node extends Application public function addInterceptor($handler) { $this->_interceptors[] = $handler; -// $this->restructure(); + } @@ -246,7 +245,7 @@ class Node extends Application public function addLimits($handler) { $this->_limits[] = $handler; -// $this->restructure(); + } @@ -320,24 +319,6 @@ class Node extends Application return null; } - /** - * @param $options - * @return $this - */ - public function bindOptions($options) - { - if (is_object($options)) { - $this->options = $options; - } else { - $options = array_filter($options); - $last = $options[count($options) - 1]; - if (empty($last)) { - return $this; - } - $this->options = $last; - } - return $this; - } /** * @param string $alias @@ -374,6 +355,7 @@ class Node extends Application return $this; } + /** * @param $middles * @throws @@ -385,7 +367,6 @@ class Node extends Application return; } $this->middleware = $this->each($middles, $_tmp); -// $this->restructure(); } @@ -406,7 +387,6 @@ class Node extends Application $class = [$class, 'handler']; } $this->middleware[] = $class; -// $this->restructure(); }