get('/', [\itguild\forms\app\controllers\MainController::class, 'indexAction']); $router->get('/example', [\itguild\forms\app\controllers\MainController::class, 'exampleAction']); $router->get('/create-user', [\itguild\forms\app\controllers\UserController::class, 'createUserAction']); $router->get('/get-user/{id}', [\itguild\forms\app\controllers\UserController::class, 'getUserAction']); $router->get("/form/{id}", [\itguild\forms\app\controllers\FormController::class, "indexAction"]); $router->get("/form-input/{id}", [\itguild\forms\app\controllers\FormInputController::class, "indexAction"]); $router->get("/form-res/{id}", [\itguild\forms\app\controllers\FormResController::class, "indexAction"]); $router->get("/input-type/{id}", [\itguild\forms\app\controllers\InputTypeController::class, "indexAction"]); $router->get("/input-value/{id}", [\itguild\forms\app\controllers\InputValueController::class, "indexAction"]); $router->post("/form-save/{id}", [\itguild\forms\app\controllers\FormController::class, "saveAction"]); $router->get("/form-result/{id}/{page}?", [\itguild\forms\app\controllers\FormController::class, "resultAction"]); $router->get("/form-item/{id}", [\itguild\forms\app\controllers\FormController::class, "viewAction"]); $router->get("/form-delete/{id}", [\itguild\forms\app\controllers\FormController::class, "deleteAction"]); $router->get("/form-edit/{id}", [\itguild\forms\app\controllers\FormController::class, "editAction"]); $router->get("/admin/create-form", [\itguild\forms\app\controllers\AdminController::class, "createAction"]); $router->post("/admin/save-form/", [\itguild\forms\app\controllers\AdminController::class, "saveFormAction"]); $router->get("/admin/form-add-fields", [\itguild\forms\app\controllers\AdminController::class, "getFormAddFieldsAction"]); $router->get("/admin/set-value-select", [\itguild\forms\app\controllers\AdminController::class, "getSelectValue"]); $router->get("/admin/edit-form/{id}", [\itguild\forms\app\controllers\AdminController::class, "editFormAction"]); $dispatcher = new Phroute\Phroute\Dispatcher($router->getData()); $response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); // Print out the value returned from the dispatched function echo $response;