This commit is contained in:
2020-09-08 11:53:09 +08:00
parent 76ed7406b4
commit 215d5517c6
5 changed files with 81 additions and 31 deletions
+30 -1
View File
@@ -84,6 +84,27 @@ class Node extends Application
}
/**
* @return bool
*/
public function hasAfter()
{
return count($this->_after) > 0;
}
/**
* @param $response
* @return mixed|null
*/
public function afterDispatch($response)
{
return Reduce::reduce(function () use ($response) {
return $response;
}, $this->_after);
}
/**
* @return array
*/
@@ -102,7 +123,6 @@ class Node extends Application
}
/**
* @return array
*/
@@ -391,6 +411,15 @@ class Node extends Application
}
/**
* @return mixed
*/
public function dispatch()
{
return call_user_func($this->callback, \request());
}
/**
* @param $array
* @param $_temp