This commit is contained in:
2020-09-08 11:46:22 +08:00
parent e21672aefa
commit 76ed7406b4
3 changed files with 70 additions and 4 deletions
+21
View File
@@ -39,6 +39,7 @@ class Node extends Application
public $callback = [];
private $_interceptors = [];
private $_after = [];
private $_limits = [];
/**
@@ -92,6 +93,15 @@ class Node extends Application
}
/**
* @return array
*/
public function getAfters()
{
return $this->_after;
}
/**
* @return array
@@ -194,6 +204,17 @@ class Node extends Application
}
/**
* @param Closure|array|string $handler
* @throws Exception
*/
public function addAfter($handler)
{
$this->_after[] = $handler;
$this->restructure();
}
/**
* @param Closure|array|string $handler
* @throws Exception