Documentation

MatchesRoutes

Contains methods for matching API requests with endpoint routes.

Tags
author

Aberdeener

version
2.0.0-pr13
license

MIT

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
bool

matchRoute()

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
Return values
string

        
On this page

Search results