diff --git a/init.php b/init.php index 5140027..ca8abbe 100644 --- a/init.php +++ b/init.php @@ -930,6 +930,22 @@ class AuthController extends Controller { } PHP; +$files['WEBROOT/src/MVC/Controller/DocsController.php'] = <<<'PHP' +render('docs', [ + 'title' => '📚 System-Dokumentation' + ]); + } +} +PHP; + $files['WEBROOT/src/MVC/Controller/TestController.php'] = <<<'PHP' Dashboard

Willkommen in de $files['WEBROOT/src/MVC/View/test1.php'] = "

Service 1

"; $files['WEBROOT/src/MVC/View/test2.php'] = "

System Check

"; +$files['WEBROOT/src/MVC/View/docs.php'] = <<<'HTML' +
+

🏛️ Framework Architektur & Dokumentation

+ +
+

Inhalt

+ +
+ +
+

1. Einführung

+

Dieses Framework basiert auf dem Model-View-Controller (MVC) Entwurfsmuster und nutzt einen Front Controller (index.php). Alle Anfragen werden zentral verarbeitet, was globale Middleware (wie Authentifizierung) und ein einheitliches Layout ermöglicht.

+
+ +
+

2. Datei-Referenz (Deep Dive)

+

Framework Core

+ +

Konfiguration

+ +
+ +
+

3. API-System

+

APIs liegen im Verzeichnis WEBROOT/api/v1/. Sie nutzen die ApiController-Klasse.

+
+// Beispiel: WEBROOT/api/v1/get.php
+use MVC\Classes\Api;
+use MVC\Controller\ApiController;
+
+Api::jsonResponse((new ApiController())->get());
+        
+
+ +
+

4. Datenbank & Models

+

Das Framework nutzt mysqli mit Prepared Statements für maximale Sicherheit.

+

databaseMethods.php (Die Power-Tools)

+ +
+ +
+

5. Helper Klassen (MVC\Classes)

+ +
+ +
+

6. CLI-Generatoren

+

php create_module.php [Name] - Erstellt Controller & View.

+

php create_model.php [Tabelle] [Spalten] - Erstellt ein Model.

+
+ +
+

7. Best Practices

+

Naming: Controller immer mit Controller-Suffix. Models im Singular.

+

Security: Nutze ['auth'] Middleware konsequent für alle internen Seiten.

+
+
+ + +HTML; + $files['WEBROOT/src/MVC/View/login.php'] = <<<'HTML'