Port entirely to a MVC-like pattern #37

Open
kazhnuz wants to merge 29 commits from refactor/use-bludit-boot-code into main
Showing only changes of commit ac4c2646c8 - Show all commits

View file

@ -33,8 +33,13 @@ class Router {
$controllerFile = $this->getControllerPath(); $controllerFile = $this->getControllerPath();
require_once $controllerFile; require_once $controllerFile;
if (is_callable($this->func)) { $func = $this->func;
call_user_func($this->func); if (isset($_POST["submit"])) {
$func = $func."_post";
}
if (is_callable($func)) {
call_user_func($func);
} else { } else {
$renderer->error(404); $renderer->error(404);
} }