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 the route's unmodified name.
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 40
__construct(Route $base, Collection $paramDefaults, string|null $forcedScheme)
Create a new Wayfinder route wrapper.
at line 51
bool
hasController()
Determine whether the route resolves to a controller class.
at line 59
string
dotNamespace()
Return the controller's fully qualified class name as a dot-delimited namespace.
at line 67
bool
hasInvokableController()
Determine whether the controller is invokable (single __invoke method).
at line 75
string
method()
Return the PHP method name on the controller for this route.
at line 85
string
jsMethod()
Return the TypeScript-safe method name for the generated export.
at line 93
string
originalJsMethod()
Return the unmodified method name as it appears on the controller.
at line 103
string
namedMethod()
Return the TypeScript-safe method name derived from the route's name.
at line 111
string
controller()
Return the controller class with a leading namespace separator.
at line 123
Collection
parameters()
Return the Wayfinder Parameter objects describing each route parameter.
at line 189
Collection
verbs()
Return the HTTP verbs this route responds to.
at line 197
string
uri()
Build the URI template used in the generated TypeScript output.
at line 225
string|null
scheme()
Return the URL scheme that should prefix this route's URI (including '://').
at line 241
string|null
domain()
Return the route's domain (including any port).
at line 253
string|null
name()
Return the route's name, normalising namespaced names for the generator.
at line 271
string|null
originalName()
Return the route's unmodified name.
at line 279
string
controllerPath()
Return a project-relative path to the controller (or closure) file.
at line 303
int
controllerMethodLineNumber()
Return the starting line number of the controller method (or closure).