This commit is contained in:
2020-10-20 15:38:45 +08:00
parent adc220986c
commit b446e86a02
+4 -24
View File
@@ -29,7 +29,6 @@ class Node extends Application
public $childes = []; public $childes = [];
public $group = []; public $group = [];
public $options = null;
private $_error = ''; private $_error = '';
@@ -67,7 +66,7 @@ class Node extends Application
} else { } else {
$this->handler = $handler; $this->handler = $handler;
} }
// return $this->restructure(); return $this;
} }
@@ -225,7 +224,7 @@ class Node extends Application
public function addInterceptor($handler) public function addInterceptor($handler)
{ {
$this->_interceptors[] = $handler; $this->_interceptors[] = $handler;
// $this->restructure();
} }
@@ -246,7 +245,7 @@ class Node extends Application
public function addLimits($handler) public function addLimits($handler)
{ {
$this->_limits[] = $handler; $this->_limits[] = $handler;
// $this->restructure();
} }
@@ -320,24 +319,6 @@ class Node extends Application
return null; 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 * @param string $alias
@@ -374,6 +355,7 @@ class Node extends Application
return $this; return $this;
} }
/** /**
* @param $middles * @param $middles
* @throws * @throws
@@ -385,7 +367,6 @@ class Node extends Application
return; return;
} }
$this->middleware = $this->each($middles, $_tmp); $this->middleware = $this->each($middles, $_tmp);
// $this->restructure();
} }
@@ -406,7 +387,6 @@ class Node extends Application
$class = [$class, 'handler']; $class = [$class, 'handler'];
} }
$this->middleware[] = $class; $this->middleware[] = $class;
// $this->restructure();
} }