config->get("site_mode") == "debug"){ $_POST['serviceName'] = "testService"; $_POST['serviceToken'] = "testPasswd"; } if(!$cs->tokens->checkRequestTokens()) Rest_fatal_error(401, "Please check your tokens!"); /** * Handle Rest requests */ $server = new \Jacwright\RestServer\RestServer($cs->config->get("site_mode")); //Include controllers foreach(get_included_files() as $filePath){ if(preg_match("", $filePath)){ $className = strstr($filePath, "RestControllers/"); $className = str_replace(array("RestControllers/", ".php"), "", $className); $server->addClass($className); } } //Hanlde $server->handle();