Implementing middlewares 0.5

This commit is contained in:
ahwelp
2018-08-21 20:41:50 -03:00
parent e5b91dd81f
commit 35ff6f7527
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -87,14 +87,14 @@ class RouteCollection{
private function define_verb(){
$verb = '';
if(isset($_POST['_method'])){
$verb = strtoupper( $_POST['_method'] );
}else if(php_sapi_name() == "cli"){
$verb = "CLI";
}else{
$verb = strtoupper( $_SERVER['REQUEST_METHOD'] );
}
}
if(in_array($verb, self::$_verbs_whitelist)){
$this->_verb = $verb;