MatchesRoutes
Contains methods for matching API requests with endpoint routes.
Tags
Table of Contents
Methods
- isVariable() : bool
- matchRoute() : array<string|int, mixed>|false
- Determine if an Endpoint matches a route.
- stripVariable() : string
Methods
isVariable()
private
isVariable(string $type) : bool
Parameters
- $type : string
Return values
boolmatchRoute()
Determine if an Endpoint matches a route.
private
matchRoute(EndpointBase $endpoint, string $route) : array<string|int, mixed>|false
If it does, return an array of variables to pass to the endpoint.
Parameters
- $endpoint : EndpointBase
-
Endpoint to attempt to match.
- $route : string
-
Route to match.
Return values
array<string|int, mixed>|false —Array of variables to pass to the endpoint, or false if the route does not match.
stripVariable()
private
stripVariable(string $type) : string
Parameters
- $type : string