CallbackRequestMatcher
in package
implements
RequestMatcher
FinalYes
Match a request with a callback.
Tags
Table of Contents
Interfaces
- RequestMatcher
- Match a request.
Properties
- $callback : callable
Methods
- __construct() : mixed
- matches() : bool
- Decides whether the rule(s) implemented by the strategy matches the supplied request.
Properties
$callback
private
callable
$callback
Methods
__construct()
public
__construct(callable $callback) : mixed
Parameters
- $callback : callable
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