refactor: Validierungslogik ins Model verschoben
- pwRequirementCheck und checkDoublePw aus Controller ins Model - Alle Passwort- und E-Mail-Validierungen jetzt zentral im Model - Controller macht nur noch Request/Response Handling - Saubere MVC-Trennung
This commit is contained in:
@@ -19,11 +19,11 @@ spl_autoload_register(function ($className) {
|
||||
$controllerName = "";
|
||||
$doMethodName = "";
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$controllerName = isset($_POST['controller']) && $_POST['controller'] ? $_POST['controller'] : "Welcome";
|
||||
$doMethodName = isset($_POST['do']) && $_POST['do'] ? $_POST['do'] : "showWelcome";
|
||||
$controllerName = isset($_POST['controller']) && $_POST['controller'] ? $_POST['controller'] : "Auth";
|
||||
$doMethodName = isset($_POST['do']) && $_POST['do'] ? $_POST['do'] : "showAuthForm";
|
||||
} else {
|
||||
$controllerName = isset($_GET['controller']) && $_GET['controller'] ? $_GET['controller'] : "Welcome";
|
||||
$doMethodName = isset($_GET['do']) && $_GET['do'] ? $_GET['do'] : "showWelcome";
|
||||
$controllerName = isset($_GET['controller']) && $_GET['controller'] ? $_GET['controller'] : "Auth";
|
||||
$doMethodName = isset($_GET['do']) && $_GET['do'] ? $_GET['do'] : "showAuthForm";
|
||||
}
|
||||
|
||||
$controllerClassName = 'Blog\\Controller\\'.ucfirst($controllerName).'Controller';
|
||||
|
Reference in New Issue
Block a user