RegexRequestMatcher
in package
implements
RequestMatcher
FinalYes
Match a request with a regex on the uri.
Tags
Table of Contents
Interfaces
- RequestMatcher
- Match a request.
Properties
- $regex : string
- Matching regex.
Methods
- __construct() : mixed
- matches() : bool
- Decides whether the rule(s) implemented by the strategy matches the supplied request.
Properties
$regex
Matching regex.
private
string
$regex
Methods
__construct()
public
__construct(string $regex) : mixed
Parameters
- $regex : string
matches()
Decides whether the rule(s) implemented by the strategy matches the supplied request.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface
-
The PSR7 request to check for a match
Return values
bool —true if the request matches, false otherwise