RouteIndex final class
Minn\Rest\RouteIndex · public/minn/src/Minn/Rest/RouteIndex.php · 80 lines
The description of one route the REST index publishes: namespace, methods, endpoints with their argument schemas, self link.
Uses 1
Constants and properties
| private | SCHEMA_KEYWORDS = array ( 0 => 'title', 1 => 'default', 2 => 'enum', 3 => 'description', 4 => 'type', 5 => 'items', 6 => 'minimum', 7 => 'maximum', 8 => 'exclusiveMinimum', 9 => 'exclusiveMaximum', 10 => 'minLength', 11 => 'maxLength', 12 => 'pattern', 13 => 'format', 14 => 'properties', 15 => 'additionalProperties', 16 => 'oneOf', 17 => 'anyOf', 18 => 'minItems', 19 => 'maxItems', 20 => 'uniqueItems', ) |
Public
| static | endpointsIn(string $route, array $table, callable $restUrl): array# | One route's endpoints as a route table describes them in the index (methods, batching, parameters); none for a route the table lacks.
@return list<array<string, mixed>> | |||||||||
| static | describe(string $route, array $callbacks, array $options, string $context, callable $restUrl): ?array# | One route as the index describes it, or null when hidden.
@return array<string, mixed>|null null when no endpoint shows in the index |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | argument(mixed $spec): array# | The published shape keeps the argument's own key order and puts `required` last. |
Nothing matches.