RouteRow final readonly class
Minn\Http\RouteRow · public/minn/src/Minn/Http/RouteRow.php · 81 lines
One line of the route table: what a route is, who it is for, and what it takes, read from the attribute and the handler method alone, so the table can be built from the classes without a request, a database, or a site. This is the row the REST index, the docs, and contracts/api/routes.json are written from.
Constants and properties
| prop | readonly string $method | Promoted from the constructor. |
| prop | readonly string $pattern | Promoted from the constructor. |
| prop | readonly string $name | Promoted from the constructor. |
| prop | readonly string $handler | Promoted from the constructor. |
| prop | readonly string $summary | Promoted from the constructor. |
| prop | readonly ?Minn\Http\Policy $policy | Promoted from the constructor. |
| prop | readonly array $args | Promoted from the constructor. |
| prop | readonly array $body | Promoted from the constructor. |
| prop | readonly bool $index | Promoted from the constructor. |
| prop | readonly ?string $params | Promoted from the constructor. |
| prop | readonly string $regex | Promoted from the constructor. |
Public
| new | __construct(string $method, string $pattern, string $name, string $handler, string $summary, ?Minn\Http\Policy $policy, array $args, array $body, bool $index, ?string $params = NULL, string $regex = '')# |
| |||||||||
| static | of(Minn\Http\Route $route, ReflectionMethod $method): self# | The row for one attribute on one handler method; the name defaults to the handler. | |||||||||
| method | argsFor(string $route): array# | The parameters as the index publishes them for one concrete route the pattern takes (a {base} route's parameters are that base's). @return array<string, array<string, mixed>> | |||||||||
| method | toArray(): array# | The row as data, for the JSON catalogue. @return array<string, mixed> @return array<string, mixed> |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | summary(string $doc): string# | The first sentence of a docblock, the way the API docs read it. |
Nothing matches.