pock

HeaderMatcher
in package
implements RequestMatcherInterface

Matches required values in one header while allowing additional values.

Tags
category

HeaderMatcher

Table of Contents

Interfaces

RequestMatcherInterface
Contract for reusable request matching rules registered through PockBuilder::addMatcher().

Methods

__construct()  : mixed
HeaderMatcher constructor.
matches()  : bool
Return true when the request satisfies this rule.

Methods

__construct()

HeaderMatcher constructor.

public __construct(string $header, string|array<string|int, string> $value) : mixed
Parameters
$header : string
$value : string|array<string|int, string>

matches()

Return true when the request satisfies this rule.

public matches(RequestInterface $request) : bool
Parameters
$request : RequestInterface
Tags
inheritDoc
Return values
bool
On this page

Search results