FrostMVC\Controller
use FrostMVC\Controller;
Base controller class for all FrostMVC controllers.
Provides URL-segment routing via route(), which maps the first URL segment to a public method on the subclass and passes the remaining segments as positional arguments.
| Property | Type | Description |
|---|---|---|
| $require | FrostMVC\Loader |
| ->__construct() | — |
| ->route() | Dispatches the request to the appropriate method based on URL segments. Falls back to index() when no segments are provided. |
$controller->__construct($pages = '')
No description yet.
| $pages | mixed |
Default: '' |
$controller->route($pages)
Dispatches the request to the appropriate method based on URL segments. Falls back to index() when no segments are provided.
| $pages | array |
URL path segments: [methodName, arg1, arg2, ...]. |
Generated from core/classes/Controller.php (FrostMVC ).