$methodName($id); } else //POST if ($_SERVER['REQUEST_METHOD'] == "POST"){ echo $controller->$methodName($data); } else //DELETE if ($_SERVER['REQUEST_METHOD'] == "DELETE"){ echo $controller->$methodName($id); } else //PUT { echo $controller->$methodName($id, $data); } } else { //http_response_code(404); new \ppb\Library\Msg(true, 'Page not found: '.$controllerClassName.'::'.$methodName); } ?>