MultipartFormDataMatcher
in package
implements
RequestMatcherInterface
Parses a multipart request body and delegates matching to a StreamedPart callback.
Tags
Table of Contents
Interfaces
- RequestMatcherInterface
- Contract for reusable request matching rules registered through PockBuilder::addMatcher().
Methods
- __construct() : mixed
- MultipartFormDataMatcher constructor.
- matches() : bool
- Return true when the request satisfies this rule.
Methods
__construct()
MultipartFormDataMatcher constructor.
public
__construct(callable $callback) : mixed
Parameters
- $callback : callable
-
Accepts Riverline\MultiPartParser\StreamedPart as an argument, returns true if matched.
matches()
Return true when the request satisfies this rule.
public
matches(RequestInterface $request) : bool
Parameters
- $request : RequestInterface