Implementing middlewares 0.2

This commit is contained in:
ahwelp
2018-08-20 21:29:17 -03:00
parent 0e02aa0ca3
commit 076496f2bb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ class Route{
call_user_func($before);
}
}
foreach ($this->_callback as $callback){
call_user_func_array($callback, $this->_params);
}
+2 -2
View File
@@ -96,7 +96,7 @@ class RouteCollection{
$verb = strtoupper( $_SERVER['REQUEST_METHOD'] );
}
if(in_array($verb, $this->_verbs_whitelist)){
if(in_array($verb, self::_verbs_whitelist)){
$this->_verb = $verb;
}else{
echo 'Invalid Verb';
@@ -140,7 +140,7 @@ class RouteCollection{
$ROUTE = $route;
$route->_before($this->_default_middlewares);
$route->_before = $this->_default_middlewares;
$route->execute();