GEMVC Documentation
Complete guide to building modern, secure PHP applications with GEMVC framework
Request Lifecycle
Overview
This document explains how a request flows through the GEMVC framework, from initial HTTP request to final response.
1. Entry Point
Apache Server
# .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
OpenSwoole Server
// server.php
$server->on('request', function ($request, $response) {
$bootstrap = new \Gemvc\Core\SwooleBootstrap($request);
$apiResponse = $bootstrap->processRequest();
// ... response handling
});