Skip to content

Internals Router Interface IRouter

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

router\interface\IRouter

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/router/interface/IRouter.php · Snapshot 8411f4287706.

Routing separates definition, HTTP request snapshot, matching, method policy, execution and error responses. Collaborators can be replaced through constructor injection.

IRouter

Declaration and architectural role

interface IRouter

Source description (behavioral corrections are recorded in Known discrepancies):

Small registration contract shared by package runtimes and route managers.

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

Method Signature
addRouter public function addRouter(IRoute $router): void
getRouters public function getRouters(): array

addRouter

Source line 8

public function addRouter(IRoute $router): void;

Parameters

Parameter Type, modifiers and default Purpose
$router IRoute $router Operation input; the exact use, validation and propagation are shown in the implementation trace.

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

getRouters

Source line 11

public function getRouters(): array;

@return IRoute[]

Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.

Clone this wiki locally