MethodMatcher
in package
implements
RequestMatcherInterface
Matches the HTTP request method.
Tags
Table of Contents
Interfaces
- RequestMatcherInterface
- Contract for reusable request matching rules registered through PockBuilder::addMatcher().
Methods
- __construct() : mixed
- MethodMatcher constructor.
- matches() : bool
- Return true when the request satisfies this rule.
Methods
__construct()
MethodMatcher constructor.
public
__construct([string $method = RequestMethod::GET ]) : mixed
Parameters
- $method : string = RequestMethod::GET
matches()
Return true when the request satisfies this rule.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface