How vanhaex/eslf works
ESLF is a lightweight PHP MVC web framework. Its main request workflow starts at the public entry point, applies middleware, selects configured routes, invokes a controller or API handler, and returns rendered or JSON output. Supporting capabilities include input/session utilities, database-backed models, alerts, logging, and ESbuilder commands. The graph preserves README-documented capabilities, but several command and middleware implementations were not excerpted; links to those are limited to documented or entry-point relationships.
Main entry points: index.php HTTP entry point · Router.php Router · InputUtility.php Input handling · Middleware.php Middleware base
Components 26
Request Runtime
- HTTP entry point
public/index.php - Route configuration
config/RoutesConfig.php - Router
framework/Router.php - Route matching
framework/Route.php - API dispatch
framework/ApiController.php - API endpoint
app/api/HelloApi.php - Middleware base
framework/Middlewares/Middleware.php - Header middleware
framework/Middlewares/SetHeadersMiddleware.php - CSRF middleware
framework/Middlewares/VerifyCSRFMiddleware.php
MVC and Data
- Home controller
app/controller/HomeController.php - Controller base
framework/Controller.php - Smarty rendering
framework/View.php - Page templates
views/home.tpl - Database model
framework/Model/Model.php - Home model
app/model/Home.php - Database settings
config/DatabaseConfig.php
Request Utilities
- Application settings
config/AppConfig.php - Input handling
framework/InputUtility.php - Session handling
framework/SessionUtility.php - Logging
framework/LogWriting.php - Alert messages
framework/AlertMessage/AlertMessage.php - Smarty alert plugin
smarty_plugins/function.add_alert_message.php
Framework Features
- ESbuilder commands
framework/Command
Other components
- Web client
- SQL database
- Developer
Connections 26
- Web client → HTTP entry point: sends request
public/index.php - HTTP entry point → Middleware base: runs middleware
public/index.php - HTTP entry point → Route configuration: loads routes
public/index.php - Route configuration → Router: registers routes
config/RoutesConfig.php - HTTP entry point → Router: dispatches request
public/index.php - Router → Route matching: matches route
framework/Router.php - Router → API dispatch: dispatches API
framework/Router.php - Middleware base → Header middleware: runs headers
- Middleware base → CSRF middleware: runs CSRF check
- Route matching → Home controller: invokes controller
- API dispatch → API endpoint: resolves endpoint
framework/ApiController.php - Home controller → Controller base: extends
app/controller/HomeController.php - Home controller → Smarty rendering: renders through
- Smarty rendering → Page templates: renders template
README.md - Home model → Database model: extends
app/model/Home.php - Database model → Database settings: reads settings
framework/Model/Model.php - Database model → SQL database: queries
framework/Model/Model.php - HTTP entry point → Input handling: reads request
public/index.php - Router → Input handling: cleans request
framework/Router.php - Session handling → Input handling: sanitizes session access
framework/SessionUtility.php - CSRF middleware → Input handling: checks submitted input
framework/Middlewares/VerifyCSRFMiddleware.php - Controller base → Application settings: checks settings
framework/Controller.php - Controller base → Logging: initializes logging
framework/Controller.php - Alert messages → Session handling: stores alerts
framework/AlertMessage/AlertMessage.php - Smarty alert plugin → Alert messages: uses alerts
smarty_plugins/function.add_alert_message.php - Developer → ESbuilder commands: runs commands
README.md