Request Lifecycle
Here’s how an HTTP request is processed in Pragma CMS:
public/index.php- Entry point for all HTTP requests
- Initializes the CMS (autoload, configuration, session, etc.)
sites/[site-name]/- Directory dedicated to the current site
- Contains config_db, pages, themes, assets, and site-specific configurations
cms-versions/[version]/system/router.php- Analyzes the requested URL
- Resolves the route to the appropriate page/controller
sites/[site-name]/pages/[controller-name]- Executes the business logic for the requested page
- Retrieves and processes data (entries, taxonomies, relationships, etc.)
sites/[site-name]/themes/[theme-name]/templates/[template-name]- Final HTML rendering
- Injects data from the controller and any relevant hooks