Catalogue final class
Minn\Rest\Catalogue · public/minn/src/Minn/Rest/Catalogue.php · 70 lines
The route table read from the classes alone: every #[Route] under src/Minn, as rows, with no request, database, or site behind it. This is what contracts/api/routes.json is written from, so an agent can read which routes exist, who may call them, and what they take, without booting the engine. The per-request router builds the same rows for the handlers it actually registered, which is what the live index serves.
Public
| static | scan(string $sourceDir): array# | Every route declared by a class under the source directory, in file order, then declaration order. @return list<RouteRow> | |||
| static | document(array $rows, string $engineVersion): array# | The rows as the JSON catalogue: a version line and one entry per route.
@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 | classes(string $sourceDir): array# | The fully qualified names of the classes under the directory, from their paths (PSR-4: Minn\A\B is A/B.php), sorted. @return list<class-string> |
Nothing matches.