Skip to content

Internals Router Events EDynamicRoute

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

router\events\EDynamicRoute

Framework Internals · Subsystem overview · Developer guide

Source: awt_src/classes/router/events/EDynamicRoute.php · Snapshot 8411f4287706.

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

Imports and dependencies

use event\interfaces\IEvent;
use router\interface\IRoute;

EDynamicRoute

Declaration and architectural role

final class EDynamicRoute implements IEvent

Constants, enum cases, traits and properties

Declarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.

Member Declaration Purpose or source contract
$routes private array $routes = []; Used by addRoute(), bundle().

Method index

Method Signature
getName public function getName(): string
addRoute public function addRoute(IRoute $router): void
bundle public function bundle(): array

getName

Source line 13

public function getName(): string

Return expressions (including local callbacks): "route.dynamic.add".

Implementation, validation guards and interaction order
public function getName(): string
    {
        return "route.dynamic.add";
    }

addRoute

Source line 18

public function addRoute(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.

State writes: $this->routes[].

Implementation, validation guards and interaction order
public function addRoute(IRoute $router): void
    {
        $this->routes[] = $router;
    }

bundle

Source line 23

public function bundle(): array

Return expressions (including local callbacks): $this->routes.

Implementation, validation guards and interaction order
public function bundle(): array
    {
        return $this->routes;
    }

Related types

Clone this wiki locally