Controller
Less than 1 minute
Controller
interface ControllerMethods
initialize
Initializes the controller before handling a request.
public initialize(): ?ResponseThis method is called before the controller processes a request. It can be used to set up any required state or perform pre-processing. Returns a Response if initialization should short-circuit the request, or null to continue.
run
Evaluates a route and runs the controller.
public run(?Route $route): ResponseThis method is responsible for handling the request, evaluating the provided route, and returning a Response object.
Parameters
| Parameter | Type | Description |
|---|---|---|
$route | Route |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000