Nexus API Reference

Route
in package

Read onlyYes
FinalYes
Tags
psalm-api

Immutable route definition. Produced by the fluent builder and by attribute discovery; consumed by Dispatcher and HandlerResolver.

The handler is either a class name string, a 'Class::method' string, or a Closure. HandlerResolver compiles each to a ResolvedHandler.

Table of Contents

Properties

$handler  : string|Closure
$method  : string
$middleware  : array<string|int, mixed>
$name  : string|null
$path  : string

Methods

__construct()  : mixed
withAddedMiddleware()  : self
withPrefixedPath()  : self

Properties

$handler

public string|Closure $handler

$method

public string $method

$middleware

public array<string|int, mixed> $middleware

$name

public string|null $name

Methods

__construct()

public __construct(string $method, string $path, string|Closure $handler, array<int, string> $middleware, string|null $name) : mixed
Parameters
$method : string
$path : string
$handler : string|Closure
$middleware : array<int, string>

Fully-qualified middleware class names.

$name : string|null

withAddedMiddleware()

public withAddedMiddleware(array<int, string> $middleware) : self
Parameters
$middleware : array<int, string>
Return values
self

withPrefixedPath()

public withPrefixedPath(string $prefix) : self
Parameters
$prefix : string
Return values
self

        
On this page

Search results