Implementing middlewares 0.4

This commit is contained in:
ahwelp
2018-08-20 21:44:43 -03:00
parent 1b3160c505
commit e5b91dd81f
+5 -2
View File
@@ -275,8 +275,11 @@ class RouteCollection{
$this->_routes[] = $route; $this->_routes[] = $route;
} }
function addMiddleware($name = '', $function){ /*
$this->_default_middlewares[$name] = $function; *
*/
static function addMiddleware($name = '', $function){
self::getInstance()->_default_middlewares[$name] = $function;
} }
/* /*