Route
class Route
Methods
Create a new Wayfinder route wrapper.
Determine whether the route resolves to a controller class.
Return the controller's fully qualified class name as a dot-delimited namespace.
Determine whether the controller is invokable (single __invoke method).
Return the PHP method name on the controller for this route.
Return the TypeScript-safe method name for the generated export.
Return the unmodified method name as it appears on the controller.
Return the TypeScript-safe method name derived from the route's name.
Return the controller class with a leading namespace separator.
Return the Wayfinder Parameter objects describing each route parameter.
Return the HTTP verbs this route responds to.
Build the URI template used in the generated TypeScript output.
Return the URL scheme that should prefix this route's URI (including '://').
Return the route's domain (including any port).
Return the route's name, normalising namespaced names for the generator.
Return a project-relative path to the controller (or closure) file.
Return the starting line number of the controller method (or closure).
Details
at line 25
__construct(Route $base, Collection $paramDefaults, string|null $forcedScheme)
Create a new Wayfinder route wrapper.
at line 35
bool
hasController()
Determine whether the route resolves to a controller class.
at line 43
string
dotNamespace()
Return the controller's fully qualified class name as a dot-delimited namespace.
at line 51
bool
hasInvokableController()
Determine whether the controller is invokable (single __invoke method).
at line 59
string
method()
Return the PHP method name on the controller for this route.
at line 69
string
jsMethod()
Return the TypeScript-safe method name for the generated export.
at line 77
string
originalJsMethod()
Return the unmodified method name as it appears on the controller.
at line 87
string
namedMethod()
Return the TypeScript-safe method name derived from the route's name.
at line 95
string
controller()
Return the controller class with a leading namespace separator.
at line 107
Collection
parameters()
Return the Wayfinder Parameter objects describing each route parameter.
at line 127
Collection
verbs()
Return the HTTP verbs this route responds to.
at line 135
string
uri()
Build the URI template used in the generated TypeScript output.
at line 163
string|null
scheme()
Return the URL scheme that should prefix this route's URI (including '://').
at line 179
string|null
domain()
Return the route's domain (including any port).
at line 191
string|null
name()
Return the route's name, normalising namespaced names for the generator.
at line 209
string
controllerPath()
Return a project-relative path to the controller (or closure) file.
at line 233
int
controllerMethodLineNumber()
Return the starting line number of the controller method (or closure).