RequestMatcherInterface
in
Contract for reusable request matching rules registered through PockBuilder::addMatcher().
final class InternalRequestMatcher implements RequestMatcherInterface
{
public function matches(RequestInterface $request): bool
{
return 'internal' === $request->getHeaderLine('X-Caller');
}
}
Tags
Table of Contents
Methods
- matches() : bool
- Return true when the request satisfies this rule.
Methods
matches()
Return true when the request satisfies this rule.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface